Add norm constraints

This pull request implements a constraints mechanism for the solver effectively allowing us to implement e.g. norm constraints which are often used either in conjunction or instead of L2/L1 constraints on the weights.
I also added an implementation of an L2 norm constraint on the weights as this is often used in combination with dropout (e.g. see the dropout/maxout papers).