More rigorous error checking; return null if no device available of given type; added pseudocode documentation.
Merge branch 'master' into createContextFix

Conflicts:
	firefox-js/js/webcl.js