DATACMNS-519 - PagedResourcesAssembler now keeps template variables of base link.

Significant overhaul of the link creation in PagedResourcesAssembler.