Add tests for timeInterval
Change require strategy

As it's more readable in the individual files when it is clear what
angular thinks a file does, the definition is moved to each file, while
in the index, only the file is required.