fix change custom field value case

Comparing the lowercased version of the old and new value prevents
changing the case of a custom field value.
add test for CF enter one value case change
Merge branch '4.0/changing-custom-field-value-case' into 4.0-trunk