Fix for webcam_snap crashing

In some cases taking a snapshot via the webcam would result in a crash. For me this was happening consistently in Vista SP2 x86, for others it was XP.

The reason for the issue was that COM stuff was being done across threads, which doesn't make COM happy. Some OSes dealt with this quite well, and others did not.

The fix contains new documentation, code tidying and some minor optimisations.

Down the track, more work should be done here to do a webcam snapshot in a single hit rather than doing it across three calls.

[FixRM #7706]