Feature/top menu refactoring

This does 2 things:
* refactors top menu javascript to get rid of its crazy ball-of-mud structure
* enables the project drop down to open links into new tabs as requested per https://www.openproject.org/issues/1695