Issue administration, more optimization

Implemented add, edit and delete for issues. Did more work on query
optimization including elimination of the issue_thumb handler (which was
responsible for a lot of sub-query behaviour).