Test objectives

Here's a few unit tests for `nntools.objectives`.  Making this pull request after a single module to check with everyone if they are happy with this style of unit testing, or if there's doubts.

Note that I'm well aware that some of the interfaces we have might break in the future.  In my experience that's not  a reason not to have tests already.  In fact, tests should make refactorings, including breaking changes, easier to make and measure.

The first commit has a little description on how to run the tests.  These instructions should go into the developer docs once we have those set up.