3967: Move glidein_min_idle calculation into its own function
3967: Move glidein_max_run into its own function
3967: Use dict.setdefault when possible for history_obj
3967: Move determining remove_excess_str into its own function
3967: Use min/max where possible
3967: Move populate_pubkey to its own function
3967: Move populate_condorq_dict_types to its own function
3967: Move populate_status_dict_types to its own function
3967: Move count_factory_entries_without_classads to its own function
3967: Move do_match into its own function
3967: Move build_resource_classad into its own function
3967: Move log_and_print_total_stats into its own function
3967: Move log_and_print_unmatched into its own function
3967: Consolidate status_dict as class data
3967: Remove redundant except
3967: Consolidate globals_dict as class data
3967: Consolidate condorq_dict as class data
3967: Fix missing return value from count_factory_entries_without_classads
3967: Replace a few lines with iteritems, list comps, dict.get