Bug 917176 - 0001. WebIDL change. r=mrbkap
Bug 917176 - 0002. DOM API implementation. r=mrbkap, r=briansmith
Bug 969779 - Use SpecialPowers to enable preference setting in oop. r=seth

1. Use |SpecialPowers.pushPrefEnv| to enable preference setting in oop.
2. Set the time of redrawing to be the time right after the image is discarded.
3. Modify the assertion to make the comparison non-trivial.
4. Remove <img>.
5. Move drawCanvas() on the image loadComplete.