Add GETNEXT / GETPREVIOUS and tighten up API for GET commands.

If GET commands are being called without either a key or (if not
using metadataOnly) a value buffer to store the result, then respond
with an explicit error code indicating such.