[AIRFLOW-52] Fix bottlenecks when working with many tasks
[AIRFLOW-52] Fix bottlenecks when working with many tasks

Dag hash function tried (and failed) to hash the list of tasks, then fell back on repr-ing the list, which took forever. Instead, hash tuple(task_dict.keys()). In addition this replaces two slow list comprehensions with much faster hash lookups (using the new task_dict).
modsy/incubator-airflow,modsy/incubator-airflow,modsy/incubator-airflow,modsy/incubator-airflow