Add sync API, docs/tests

See: stackgl/glslify#31