Updated middleware loading to give custom loadMiddleware functions access to the default Sails middleware, as well as the global Sails object.