Updated matrix object.

Network has been updated to utilize a new matrix object which has an array of weights rather than each neuron having its own weights. This will allow more complex architectures such as Boltzmann Machines and Hopfield networks in the future, I believe.