Added ability to control whether users can delete posts.

Similar to the currently existing ability to control whether users
can edit posts.

Fixed post view, so buttons reflect whether ability exists or not.

Added tests.

Fixes #485