Fix cost

Fixes and fully implements the NNTrainer.

The train method is still untested, but the cost function created by NNTrainer works and is fully accurate up to 9 significant digits. It is also relatively fast for 100 training examples and a small feature set!