Added previous cursor stuff to the frontend.

- Refactored cursor responses to remove a bunch of copy-pasted code.
Added a `_last` parameter to get the last key in the subtree from HTTP.

- Fixed some naming things in the port_driver.