Add capturing screenshots to SLDevice (updated #39).

This is a version of #39 rebased to resolve merge conflicts and cleaned up a little.