Added a neuron factory class and neat node class.

Heavy refactoring performed in Agent.java (specifically the network
creating code) as well as light refactoring across a few files. (I will
split commits properly next time, sorry).