Add symbolic state methods.

I modified CD's get_gradients method so it uses theano symbolic variables
instead of shared variables for the state. To do so, I had to adapt the
make_state and make_layer_to_state methods, which I did by adding new
make_symbolic_state and make_layer_to_symbolic_state methods.

Also, I made sure CD used the provided input to initialize the visible layer's
chains.