Compute z-index where modals will be inserted

This change ensures that the z-index of both the modal and its backdrop are computed according to the same CSS rules that will apply once the actual elements are added to the DOM.

This in fact fixes modals for people who use a prefixed version of bootstrap:

    $.fn.modal.defaults.manager = '.bootstrap-css';