Fixes DS-296: Includes new global function declarations in bootstrap

The new file is `bootstrap/tig_functions.php`, and is meant to conditionally declare any custom functions that haven't already been defined. The only one of these so far is `tigcache()`.

Also

* Reformats header auth handling in `UserController::mockApiAuthFilter()`, and escapes header input
* Adds top-level doc block comment for `UserHelper`