WIP: Refactoring of candidate session access ctrl
WIP: Refactor of candidate services

This now uses the new authentication filter, and I've converted the
existing session token idea so that it works like an XSRF token.

Needs testing and tidying next.
Merge branch 'master' into candidate_access_refactoring
Finished initial candidate refactor. Needs tested

The new candidate session management has been refactored and joined up
with the existing MVC and service layers.

I have tested with the demo & instruction functionality and this is
working correctly.

Still need to test with LTI, which I can't do until I'm back in the
office. (At home presently.)
Merge branch 'master' into candidate_access_refactoring

Conflicts:
	qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/CandidateSessionStarter.java
	qtiworks-engine/support/schema-migrations/beta5-to-beta6.sql
Merge branch 'master' into candidate_access_refactoring

Conflicts:
	qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/DomainConstants.java
Removed some redundant methods and constants

These ended up no longer being required after the recent candidate layer
refactoring work
Minor documentation fix to TestSessionController
Added TestSessionController.exitIncompleteTest()

This new method safely rolls to the end and exits a test that's
currently in progess. This idea might be useful to help with proctoring.
Removed temporary BEMA test closing code
Removed unused code from AdhocService
Minor refactor to CandidateSessionCloser calls

I've moved the result calculation logic out of CandidateSessionCloser,
as I noticed results were sometimes getting calculated twice. The net
result should be a bit easier to follow.
Change to semantics of CandidateSession finishing

I have renamed 'close' as 'finish' in the CandidateSession entity, with
slightly better semantics:

1. Test sessions are now marked as finished when the last enterable
testPart is ended, which is the earliest possible time that OVs will be
finalised. LTI return now happens at this time.

2. Item sessions will continue to be marked as finished when the item
session ends. Note that it's possible for the session to reopen again,
and the session will be marked as non-finished if this happens.

Some schema changes will be required to accommodate this, so I've added
an entry to the migration script.
Moved session explosion code into CandServiceBase
Fixed regression in cand session authn

The new candidate session authentication filter wasn't specific enough
in the URLs it applied to, which was getting in the way of the asciiMath
helper. This is now fixed here. (However, we may want to restrict access
to the helper so that it can't be used outside sessions...)
Changed cand sessn finish/terminated to timestamps

These two boolean flags have been replaced with timestamps, which will
be more useful for reporting purposes.

The schema migration script has been updated as appropriate. Note that
existing sessions will have their finish/terminated timestamps faked,
which is the best we can do.
Fixed linear nav case not covered in commit b2c4991

The commit b2c4991 only improved the timing of session finish in the
case of non-linear navigation. This commit does the same for linear
navigation, by finishing the session when the final item in the final
testPart is ended.

I have also added a new FINISH_FINAL_ITEM constant to
CandidateTestEventType to make it easy to see when the final item in a
testPart has been ended.
Merge branch 'candidate_access_refactoring'

Conflicts:
	qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentProctoringService.java
Added html5shiv for IE<9
Minor improvement to proctoring/reporting GUI

* Actions menu has been split into separate Analysis & Proctoring. This
makes sure destructive actions are visually separate from the main
reporting actions.
* Added more 'refresh' links when appropriate in LTI views.