Added require method to the root scope, with a requireContext property which
can override the context that require is called in. The method wrapps the callbacks
in $scope.$apply so that it doesn't need to be done in each place require is needed.