better handling of output fields for multi-entity queries (apply only after KWS pep8 fixes pull)

this is based on the earlier pull request, so first apply that one: #4097 

* in KWS, the fields are now identified per lookup and not by PK as earlier
  - as a consequence file,run,lumi will get it's proper fields
* keylearning is indexing the field as earlier per (sys, urn)
  - we may add additional param lookup into db, but I see no need...
* minor pep8 fixes to keylearning code