Fix the z-index for the modal dialogs.

A recent change to Djblets removed the custom z-index from modal
dialogs, as they were just a guess and could often be wrong. This is a
counterpart to that change that just sets the z-index to be fit in the
most appropriate space in our z-index ordering.