Moved handling of decay for unsupervised and pretrained layers to decay class

The pretrained layer throws a NotImplementedError exception for decay.
The decay class handles this exception by returning 0 if the decay
coefficient is 0.