Moved much code to Login.js

Tests for not being logged in, setting up main body divs and Env message
divs, and arranging pages.
Merging and resolving conflicts
Merge remote-tracking branch 'upstream/master' into 1112_logged_out
Updated things from #1174 to match
Resolved merge conflicts
I'm not terribly fond of git, really
Merge remote-tracking branch 'upstream/master' into 1112_logged_out
Or working *around* my tools rather than with them
Added basic logic for ornery, currently without unit tests
- Changed reroll timing of ornery to end of turn
- Removed run_hooks_at_game_state, and shifted logic to the appropriate game state
Added BMSkill-level unit tests for ornery
Added failing BMGame-level unit tests for ornery
Reduced calls to arrangePage in Game.js
Simplified what's passed to Login.showLoginHeader()
Fixed bug in code so that unit tests now pass
Reinstated (failing) unit tests of now-defunct BMDie->run_hooks_at_game_state() at game level instead
Fixed code so that unit tests for resetting BMDie->hasAttacked and BMDie->inactive now pass
* first attempt at adding a specialized version of bm_rand() for test use, in both vagrant and jenkins
* now there's a test-related PHP file in deploy/jenkins/, tell the auditor to chill
* try running phpcb after phpunit