added parameterized loss functions for reconstruction error loss, refactored some bookeeping at the end of the constructor (and __setstate__) to call a helper function, in the spirit of DRY.
added parameterized loss functions for reconstruction error loss, refactored some bookeeping at the end of the constructor (and __setstate__) to call a helper function, in the spirit of DRY.

lzamparo/SdA_reduce,lzamparo/SdA_reduce,lzamparo/SdA_reduce