Updating applicability api to accept unit_criteria instead of list of un...

...it keys, updating docstrings and unit tests

This is part 1 of the fix for https://bugzilla.redhat.com/show_bug.cgi?id=928509 and includes changes to applicability api to accept unit_criteria which is a dictionary of 
type_id : criteria instead of list of unit keys keyed by type id. It also includes minor re-factoring and renaming of a couple of functions related to applicability api. 

Please also review https://github.com/pulp/pulp_rpm/pull/167.