Second Test: Gradients, Errors, Costs

Error module:
Removed errors for the time being. Might just print layer_id along with
each traceback.

Gradients, Costs:
Major changes. Tested against SSAE, SAE, SLD_missing, with linear, tanh
and logistic transfer functions.
Cost and gradient functions work.
Wrote separate KL function for tanh.

Handling of missing data works, but is a little ugly to implement,
requiring concatenation of data with its mask.

Discovered error in SLD code:
Cost involves (W1/visible_size)**2.
The gradient of this wrt W1 should be W1/(visible_size**2), but instead
I wrote W1/visible_size.

Discovered error in WY's SSAE code:
The KL_tanh function was applied to layers with linear transfer
functions. The code still runs, but it's hard to justify this
theoretically.

Combined sublayers:
In situations where multiple input layers feed to a single output layer
(with a single transfer function), this will be treated as only 1
sublayer, rather than 1 for each input.
Introduced decay_weighted to penalize different parts of the W matrix
differently. Can be used for missing data, or WY's multimodal data
fusion.

Next step: Automated generation of:
- Layers
- Cost
- Gradients
Also, need to program a gradient checker as there are no more existing
nets to check against for new architectures.