Refactor FilterConstraints

Note the disabled test in TextFlowDAOTest - all test behaviour has been split into other tests that pass, but I have left the minimal failing case until we can get to the bottom of why it fails.

This is working, but there are a few more places that are using a bunch of booleans to describe which states are included/filtered/whatever. In the interest of keeping things manageable I think it's better to put these changes in a separate pull request.

I'm not happy with the name of ActiveStates or its getter methods. I'm open to suggestions for these. It is effectively a set of ContentState with convenient getters, so perhaps something like ContentStateSet.hasNew() would be more appropriate.

The builder for FilterConstraints has added a bit of verbosity, so it may make sense to add a few more static convenience methods in FilterConstraints to get a builder that already has some parameters set.

I have left the surprising state-flipping behaviour in FilterConstraints, since changing this could clash with another change that is in progress, and is not really related to the current change.