Adding the gated autoencoder model and an example of how to use it.

I seem to have lost the ability of leaving notes on the exact line, I'll try to clarify.
In `def cost(a, b, c, d)`, the function parameters should be more descriptive than `a` to `d`. Also, there should be a docstring.