Support for bitsets allocated on the stack

This patch includes an _init and _done function for bitsets allocated on
the stack.