Add Sandbox support

@rryan
How are we supposed to use the SecurityTokenPointer stuff. I just added things a bit similar to other places in the codebase. But I'm not sure if I did it right. Did you document somewhere how the sandboxing in Mac OS works?