First and last page for bootstrap pagination

* Display pagination controls as following format: 1,6,7,8,9,10,15 (8 is the active page, 1 is the first page, and 15 is the last page) so the user can have a sense of how many pages there are.

* Factored out append_page function to add more flexibility in adding pages