Replace category list in EditPost by category buttons

- click on category remove it from the post
- introduce a new layout: FlowLayout
- some refactoring (don't use JSONArray to manipulate data)
New database version (v18) atlering categories table to add parent_id