Implemented deep belief networks

Implemented DBNs with support for pre-training as a stack of RBMs, conversion to a neural network for supervised fine-tuning, and sampling the states of the visible units.