Bugs fixed for wrong orientation

The following bugs are fixed:

Preview doesn't change orientation when device rotates
Capturing image always use default orientation
Wrong orientation when capturing video