Deprecate the dangerous doCalculation identifier

• no-one ever used it
• the whole concept of privileged vs unprivileged user is not as simple anymore as logged-in vs. not-logged-in
Make sure template refs are restored on wakeup

Fixes #176