Stop unconditionally setting the z-index on sync

This causes a bug where hidden widgets set the z-index of the mask
to their own z-index. The mask z-index is anyway correctly set
previously in _uiSetHostVisibleModal.
replace areSame => areEqual because older browsers return a string, as opposed to a number
Merge branch 'modal_zindex_reset_by_hidden_widget_fix' into dev-master
build widget-modality