Refactor aliased_table_for and remove aliased_name_for

This refactoring reduces the number of conditionals needed to build
`aliased_table_for` and then can remove `aliased_name_for` because it's
no longer necessary.

`aliased_name_for` was only used in this method and in `#initialize` in
`JoinDependency` so that was replaced with `aliased_table_for` as well.