hide delete actions if not authorised, toggle between delete and undelete

This pull request
-  Hides the delete and  undelete actions from the inlcuded layout if not authorised to delete a thread by the authoriser
-  Makes it possible to undelete a deleted thread