ARMORY-150 - Review and correct new armoryd code

Add a decorator that allows JSON function errors to both be logged and
returned to the caller.