logging: refactor and add a loglevel.

Related: RhBug:1026035
logging: additional logging output on repo loading errors.

Related: RhBug:1026035
renamed hy_query_filter_latest to hy_query_filter_latest_per_arch
added latest to query ignoring architectures
replaced PyInt_AsLong with PyLongAs_Long
replaced PyInt_FromLong with PyLong_FromLong
removed define PyString_AsString in pycomp.h
tests: superfluous query.run() calls.
written API changes for Query filter latest option (RhBug:1025650)