PhotoManager: Remove 'magic string'.
Photo DB: Move random number creation from PM.

The creation of the random number used to select the next photo (based
on rating) is done in the Photo DB now, since the DB can easily find out
the photo with the highest rating. This prevents a situation where a
number is created that is greater than any ratings, and returning no
photo.
Photo DB: Queue photos to return for get_rand...

Queue the photo to return in get_random_photo. This is in preparation
for running the DB operations in a seperate thread.
Photo DB: Run DB operations in a seperate thread.

This will allow functions running in different threads to work with the
same DB objects.