Django 1.5 paginator fix

On Django 1.5, `Paginator.{previous,next}_page_number` throw exceptions when there is no next or previous page.

This patch resolves the issue by checking that there is a previous or next page number first, and returns None for those values if none exists.