Move some authentication logic out of lib/Authenticate.php and
into gui-modules/login2.php. This reduces duplicate code for
training & regular cashiers and allows a session close call
before sending a drawer kick command to the printer
Cleanup old session variables

I removed A LOT of settings from lib/CoreState.php. This is
partly in the interest of basic code cleanliness and partly
to reduce reliance on $_SESSION where it isn't necessary. Locked
sessions don't fail gracefully. Most changes fall in one of
these groups:

1. Setting no longer does anything: e.g., "away" or "scan" fall into this
category. Values were assigned to these settings in various places,
but nothing pays attention to them. These I simply removed all
instances.

2. Setting is used in exactly one place: e.g., PrehLib::checkstatus()
assigned several session variables. This function is only called in the
Void parser so it can simply return those values rather than stick
them into the session. I refactored these kind of situations to
behave the same way without using sessions.

3. Setting is used but does not need to be in the session: e.g.,
I changed "idSearch" to a URL parameter instead.

Once I have these changes on live lanes, I want to try
turning to receipt printer off at various points in a transaction
(to simulate out-of-paper/jam/other failure) and see how well
POS copes with possible session locks.

Conflicts:
	pos/is4c-nf/gui-modules/memlist.php
Merge remote-tracking branch 'origin/reduced-session-usage' into reduced-session-usage