Use the syntax-propertize mechanism instead of after-change-functions

Apparently fixes #19, but not tested extensively yet.