Adapt restit API changes

Added Reset methods to response structs used in restit tests.
Implemented better status codes

Use better status code response in all REST interfaces.

Added a method in PatRestHelper to count results for the purpose
to determine if there is no result in retrieve (to return 404).