remove/add forms from case history when they are archived/unarchived

+ tests.

a few other little things got bundled into this. oops.