Implement foreign rules

Fixes #17

This adds a magic rule called foreign and adds it to the compiler.

I couldn't figure out what to do with super rules.