Add functions to dump all bound variables

Adds functionality to dump or print all bound variables within the scope,
as a means of debugging a problem I'm experiencing with Org Mode.