Switch to new pagination header mechanism with better fallback
When storing SQL based pagination headers, the DAO + original query will be stored to allow for repeating the query on subsequent requests. Additional logic has been added for best effort fallbacks as well.