add a matching algorithm based on discrete cosine transform.

similar to phash at phash.org
use phash for card matching
add basic index page
fix permanent/temporary radio buttons on fetch_decklist
Merge branch 'master' into perceptual_hash

Conflicts:
	scan_card.py
add a basic card gradient cacher

based on functool's LRU cache from python 3. so sad it doesn't exist in
2.7 :(.
fix imports
temporary hacky fix for unicode filenames (assumes utf-8 encoding in os)
create updated match_card, based on machine learning, with condfidence
update match_db_cards to auto-verify 'certain' matches.
bump cache size
actually calculate the score correctly

machine learning result was based on the feature 'normalized share of ccoeff scores', not
the straight ccoeff score
with correct calculation, just return blank for unsure

we don't really have the case anymore where we were getting correct
results at the top of 'no'.
remove commented print statements
fix recognition updating
make InvCard printing actually work.
bump current standard format
slightly better working P/T parsing for search cards
show P/T and mana cost on search results
properly sort & group on reinsert-show page