Add a test to make sure we can set NULL values for Collections (bug 894645)

#981 Implemented everything, this just adds a test and tweaks Category creation in tests to make problems easier to spot.