Ordering of categories

Hi,

We needed to be able to manually order categories in a project, so we implemented it and here's the pull request. It was discussed in issue #252.