Yes. I believe the basic rule is that purchases in-app will demand 30%, but external purchases are free. Note that you can't put in any button or external link in the app to do the purchase without paying the Apple tax.
At least according to the latest discussions I've seen about the subject.
Would you determine whether they bought the Mac or PC version by a code they type in or an email / password?
This type of process in do-able, it's usually best to offer at least some type of functionality if you are releasing it free on the App store. Like a freemium version or some limited access and then if they put in their code, or login it gives the full thing.
But, unless you are Sony, Amazon, Google or a big name they let stuff slide through a bit more now.
We released an app that required you to sign in to use it, with no link to even make an account and they let it through. Which was a HUGE surprise to me. So essentially you had to have a paid account already to use the iPad version.
Yes this is possible. Don't see any problem with this.
However - the App market is huge... 70% of a two million bucks is better than 100% of one... well... as long as you love Apple.