Fix the drive logic for pullup and pulldown inputs.
Add a bitbanged I2C ACK checker for 0-byte I2C transfers (since the HW
doesn't support it).
Add a timeout on I2C reads and writes so they don't hang forever if a
device is not present.
Fixes#38
Use a constexpr template to calculate the valid pins for different IO
hardware. This lets us have an easily readable list of pin numbers that
we can adjust/check.