Added first/last inactive generation

Made first/last links configurable. It allows not to dissapear links if we are already at first/last page, if needed. By default templates are empty – for backward compability.

Also i replace {uri} with # in inactive url templates. That allows to configure link of inactive pages, not hardcoded # as before. It brakes bc a little. I think that really small number of people will get broken urls of inactive pages, if apply my changes. I can add sanitizing of inactive template to remove {uri} from inactive template but think that it's very weird and clumsy.