Relocate vendor scripts.

Some scripts have been moved to core views or core services. The router
has been appropriately named StateRouter, and configured to have the
same API as the planned external StateRouter library.