performance optimizations

- make treeMap calls that want a list of mapped values returned
  explicitly ask for it, so resources don't get wasted appending to the
  list when it's not used
- optimize treeMap a little
- tweak some logic to make a somewhat expensive operation in a loop that
  gets called a lot get called only when necessary
monkey-patch jstree.create to make form loading faster (Case:55212)

and remove an unused event fire
Revert "performance optimizations"

This reverts commit 37411325715486e6b2863d8b9fb0949f22605743.
fix botched revert
remove todo.txt
Merge pull request #43 from dimagi/case-55212

improve form loading speed (Case:55212)