call fewer ace methods

Cache the ace session field in order to reduce the number of event listeners created. This issue will also be alleviated with the new version of ace.

@umop