Turned pagination into a directive.

* Removed duplicate pagination code from Posts/Thread views
* Changed pagination into a directive:
  <pagination page="{{page}}" page-count="{{pageCount}}"></pagination>