Bug 987527 - Register Vsync monitor to HWComposer. r=mwu

In order to enable/disable the Vsync from mHwc, we should make sure
the order of each command is correct. In this patch, I added an
interface for registering these mHwc callback functions and some
accessor/helper functions for manipulating Hwc Vsync.
Bug 1057172 - Add one more length check for valid decoded frame. r=sotaro
Bug 1058599 - Use string instead of nsIURI when calling xulstore. r=enn