Make sure functions that call network.userid() are guaranteed to have context first.

fixes #3130
Migrate user related code from network.js to user.js.

Network.js should only be taking care of network interactions, not keeping track of userid's and things.
Remove network.checkAuth, preferring user.checkAuthentication
Move jwcrypto seeding from network.js to user.js
Merge pull request #3134 from shane-tomlinson/refactor_network_user

Refactor network.js & user.js to move user related context to user.js