Loose comparison when dirty-checking attributes

In normal scenarios it has more sense than strict comparison. It fixes the problem when an integer attribute being assigned the same value, but as a string (because from a form), is considered dirty.