Small performance improvements

* cache compiled sub-blocks by storing their options in a global cache keyed
  on uid; this means that we only compile each block once

* remove some local var aliases for prototype members; these turn out not to
  be beneficial.