Factor out jsonm (and uutf) dependencies

they were still source-included for historical reasons. Closes #1574