convert integers in JSON responses to intervals in SQL
allow disabling deep results per-request

originally by @johaness
allow fine grained control of relations included in output
bump to 1.current-upstream-version
support deep parameter in PUT/PATCH

follow up to d85b91e0d5d133ddb989d31ce98ae4f385d2432f and dc06ae4ae75994d354db8bbe62532bd04da0b5ac