fixes #146 Add context class and track the current writer/context in the
frwlock