add parser callbacks: onCreateNode, onCreateScope, onDestroyScope

- initial work for #22
- rename exitScope to destroyScope to better complement the naming of
  createScope