fix other unit test failures
Consolidations.
Merge remote-tracking branch 'origin/master'
Corrected errors introduced by another editor.
Corrected (haystack, needle) to (needle, haystack) for in_array().
flat apis to fix server redirection issue

Added a bunch of flat apis to fix problems where server cannot be
configured to redirect the calls
Some trivial fixes
Added ucfirst() to the flat-routing API.
Commented out the reauthentication in invoke() because reauthentication comes at lower levels in the application (can’t be overall because some scripts don’t require reauthentication).
Placed Connection::get_shared_instance() at a better spot in reauthenticate().
Moved exist_with_result() into APIUser for deauthentication.
Fixed APIList.insert().
Removed extra whitespace at ends of files (causing problems for HTTP headers).
Deprecated APIBase.exit_if_not_authenticated(), replacing with Session::reauthenticate().
Inserting lists works, but the back end incorrectly returns an error to the front end.
List insertion and deletion work.
Moving list_lists.php => user_lists.php.
APIList works.
Added APIList.add_entries() and APIList.remove_entries().
Added stubs.