refactor - move common functions into jspin.c
Merge branch 'master' of github.com:espruino/Espruino