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

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