Added Result Set Limit so that the number of items can be controlled.

Added result set limit, so that the most recent N number of entries can
be returned. Addtionally exposed error handling to C API.
Added error handling to the C API
added paging and flushing
made files protected variables
Merge pull request #26 from cloudant/skip_results

added paging by skipping results