Added element.setConstraint method

This method sets a new constraint on an item, which might be useful in certain user scenarios, for example if a new x or y drag constraint must be set on the element as the drag is started (this is the case in case of our software).