Bug 1004458.  Maintain modal state on outer windows only instead of relying on forwarding from inner to outer.  r=peterv
Bug 1008719.  CSS syntax got changed to allow identifiers starting with "--", so update our escaping code accordingly.  r=dholbert