Use shared_ptr for storing neuron weights.

Decreases memory usage when learning is done on multiple tracks.
Otherwise performance is not impacted.
Merge pull request #73 from petersohn/master

Use shared_ptr for storing neuron weights.