reorganized rest interface implementation, added frame for dirlist api

Next up is the actual implementation, should be easy enough
Initial and rough implementation of the rest dirlist interface

Currently, posix only, and I assume it wouldn't totally work in production,
but we will have to see what kinds of input paths it actually has to handle.