Changed StarcounterEnvironment.AppName from a property to a thread-bound field.
Changed UserHandlerInfo.RunUserDelegates (in Starcounter.Rest) to make sure the thread invoking a user delegate is always bound to the application the given delegate belongs to.
Changed the internal Application.CurrentAssigned implementation to return the application attached to the application name bound on the calling thread, or null if no such application was set.
Rewrote the implementation of Application.Current to correspond to the new way we store and retrieve the application context.
Moved assigning of the current application name out of the DbEnvironment constructor since its not consistent with the application model (it must be possible to have a database environment with no current application).
Assured NewRestTests unit test properly assigned itself as the current application when ran.
Redesigned the Package processing in the code host, principally assuring that the application was bound during the entire bootstrapping sequence no matter how and from where an application was booted.
Merge branch 'issue/1653' into develop. Fixes #1653.
Merge branch 'develop' into issue/1651