CategoryForm: persist data to the DB

Now the new category is saved in the database and is correctly displayed
in the tree view.
Add test data for the database