uploadr: make 'buildRequest' a function

Move these out to their own functions, no need to have them hanging on
to the uploadr object.
uploadr: make urlGen a function

This moves urlGen to a function and simplifies the logic for appending
the query parameters.
uploadr: remove unused variable
uploadr: urlGen always needs a signature

Remove the signCall/urlGen copy-pasting. Now urlGen always signs the args.
Make signCall a function while I'm here.
uploadr: md5 is deprecated, use hashlib instead
uploadr: fix docstrings

The old docstrings were outside the methods. Move 'em inside. Fix the
indentation in checkToken by removing the big else block.
uploadr: remove blacklisted "foo" variable name
uploadr: add docstring
uploadr: fix overly long lines

More lint fixes - also instead of multiple replace calls, use a regexp.
flickr2history: delintify

remove user global variable, add docstrings, fix relative import of flickr
split long lines, use lazy-logging.