js/core: Split server-router in multiple smaller functions.
js/core: Split server-router in multiple smaller functions.

Change-Id: I7331bff40e3aa23124daf2ef8743a50cb661b0e3

vanadium/js,vanadium/js,vanadium/js,vanadium/js