FIX: pagination template with THOUSAND_SEPARATOR

Fixes incorrect urls in pagination templates when THOUSAND_SEPARATOR is
used, ie: ?page=1.000

Also do not use THOUSAND_SEPARATOR when displaying page numbers.