Orientation refactorization

http://jira.mosync.com/browse/MOSYNC-3327