pkg/index: move sqlite implementation to sorted

Change-Id: I1e300ffa14547fabeac8d255fd694054ebcb9e53
images: fix Decode when resize + rotate + max W/H.

Adds more tests to cover rotations with resize when used with
MaxWidth/MaxHeight, previously only ScaledWidth/ScaledHeight were
tested.

Improve tests to compare bounds when determining equality, otherwise
an image sized 0x0 is equal to all other images.

Sort test image filenames so test order is stable and obvious.

Keep more data in memory when indexing images upon receive.  Some
largish CR2 files need more data or the EXIF parsing will fail.

Should address some or all of https://camlistore.org/issue/274

Change-Id: I80d90c33538c9d62ce4480ccb58c003e18ee6629
misc/resize: don't depend on Go 1.2 image/color/palette in test
Merge "pkg/index: move sqlite implementation to sorted"
Merge "images: fix Decode when resize + rotate + max W/H."