fix: error message showthread.php?pid=x for deleted posts, refs #947

* showthread.php
  * added check if post with set pid exists before a thread with tid null is searched in the db
Merge pull request #951 from Nik101010/fix-947

fix: error message showthread.php?pid=x for deleted posts, refs #947