Fixing two issues with index page indices.

Issue 1: if Nikola indexes overflow from one page to two pages (i.e. `num_pages = 2`), `nextlink`
value is not set.

Issue 2: if Nikola is on the the `i == num_pages - 1` index page, it will not populate `prevlink`.
Since `prevlink` would be the `index.html` page, it needs it's own logic branch.
Merge pull request #535 from arusahni/master

Fixing two issues with index page indices.