Close file on `Cursor.remove` write error.

Also, added the ablity to specify a per validator janitor function to
the validator function built by `janitor`.

Closes #300.