Split layer initialization into 2 parts.

The constructor now just takes the information specific to the layer
itself (num_outputs, filter_size, etc).

The attach method is called when a layer is added to the network; this
allows the layer to initialize weights based on the previous layer in
the network stack.

This simplifies the parser as well; it now just constructs layers based
on the information in the config file.

Trainer.train now takes num_epochs instead of having it be a instance
variable.

Moved collection of layer information into a separate function
`cache_outputs`.