Added function to measure execution time.

- function `timer` in `nengo.utils.testing`