Check for zero-weight constraints

Library used to crash when a constraint was added with a weight of
zero, now throws an exception. Related to #18