Enforce constraints from the start of learning

This fixes an issue where @memimo had to manually do this at the end of Layer.set_input_space. I don't think we should need to remember to do it in every model class.