Pages: Add a loading label to photo page.

The loading label will show before the photo viewer loads a picture
(to be implemented when PhotoManager caches photos).
Thrd: Simplify running a single function in thread

The function will run in a seperate thread, and a callback will be
queued to run in the original thread.
SqliteFacade: Add photo DB facade to the factory.
ImageCache: Add initial class.

ImageCache object now passed into PhotoManager constructor.
PhotoViewer: Don't resize the image before load.

Check that an image has been loaded before trying to resize it.
PhotoManager: Temp changes.

Temporary changes to commit before changing the PhotoManager to use a
state machine.
PhotoManager: Use a seperate class for photo data.

A new class (PhotoData) has been created for info needed for photos.
This should keep the PhotoManager class a bit cleaner.
PhotoManager: Use a simple state machine.

The state machine removes a fair bit of complexity from the PhotoManager
and helps with unit testing. Also note that the PhotoManager's methods
have been changed to lower case in this commit.
Tidy: Change all functions to use lower case.
StateMachine: Create generic classes and fns.

Create a generic state machine class and helper classes / functions. It
is now possible to create a state machine from a list of transitions.