Merge some bugfixes for embedding shutdown
Bug 1001853 - Don't loop waiting on the monitor, and acccount for the fact that timeouts are treated as success. r=jgilbert
[xulrunner] Bug 1001853. Fix dealock in compositor. Merge remote-tracking branch 'origin/embedlite_31' into nemo_embedlite_31