Splitting out crud-building functions into hapi-plugin.

jira: QUES-37