Update dht22.c

Refactored the code a bit to fixed a few issues (input pin handling did not work) and made it a bit easier to use.
Merge pull request #1 from sprotty/patch-1

Update dht22.c