Added devices_next() and devices_prev()

These two functions will be useful for paginating categories in the web app. Each one calls get_category_names() and increases or decreases the offset to pass to the api request.

Also, device and category are being used interchangeably in this file. Since they mean the same thing, they should be consolidated into one common term.