fix leaking globals
passport-ldap no longer leaks globals
xpath.js no longer leaks globals
clean up review issues
Merged master into simong/emailaggregation