Joint optimization of user association and dynamic TDD for ultra-dense networks