Moved popup code to VRF selector directive

Moved the code handling the popup menu for the VRF selector into the
VRF selector widget instead of keeping it outside. This makes it alot
easier to perform actions when the menu is opened (such as placing focus
on the text input field) or for example close the menu when a VRF is
selected.