add db for sync, tests, orientation fixes for ios5

- ruben