Implement platform-specific dependencies

cc #610
Could you add a few more tests along these lines as well?

* Make sure that a dependency for a platform not being built for still shows up in the lockfile
* Make sure that a dependency *isn't* compiled if it's not for the relevant platform (e.g. with invalid syntax)