Fix for JS errors when updating the AngularJS model for relationships.

When a relationship is associated through the HTML select, before any other form elements, then the underlying AngularJS model has not been instantiated. The fix ensures that the model object is created before any watches act on it.
Fix for highlighting the current menu item.

The route matching algorithm now verifies whether the routes match strictly, instead of lazily. This avoid the problem where an Entity may have a name that is a substring of another entity.