Let pin.save actually save again

The startup function that stores the pinmode and value was still
generated, but in commit b33ab26 (trying to fix the bitlash re-entrant
issue) the actual doCommand call that saves it was (accidentally?)
removed. pin.save would still set the pin mode, but it would not be
saved across reboots.
Fix lockup in SleepHandler::doSleep

After enabling the ADC after sleeping, a loop waited for VDD to be back
at the right level before continuing. However, the condition on the loop
was inverted, meaning the loop would wait _while_ the level was correct.

If the VDD level was ok before this loop was reached, this would lock up
the scout. In practice, it seems this didn't happen until wakeup
interrupts were added (which add some delay after sleep).
Add Pbbe::LogicalPin::in() method

This allows easily checking if a given pin is present in a given mask.
Support waking up on pin changes

Using the power.wakeup.pin("pin_name", [enable]) command, you can now
enable wakeup from sleep on changes to specific pins. The pin must be
configured to input (or input_pullup) before sleeping to make this work.

SleepHandler enables the corresponding interrupt handler for waking up
the scout, but nothing actually happens in the interrupt. After wakeup,
if the pin change holds on long enough, the normal event handlers are
triggered and can be used to react to events.

Not all pins are available, only the pins that have external interrupt
or pin change interrupts (which aren't a lot on 256rfr2 unfortunately).
Supported pins are: D2, D4, D5, D7, BATT_ALERT, SS, MOSI, MISO, SCK,
TX1, RX1, SDA, SCL.

Of these, pins D4, D5, D7 and BATT_ALERT only support waking up on a low
level, not on a change. This means that wakeup is enabled for one of
these pins and it is low when starting the sleep, the scout will
immediately wake up again, effectively preventing it from sleeping.

The pins shown above are the ones supported by SleepHandler, but the
power.wakeup.pins currently only allows passing D2, D4, D5 and D7, the
others are refused. This will probably change in the future.

Furthermore, due to a bug [1] in the Arduino core, for the SCL, SDA, RX1
and TX1 pins when a pin change happens while not sleeping, the next
sleep will be immediately interrupted because the interrupt flag remains
set and immediately triggers the interrupt.

[1]: https://github.com/arduino/Arduino/issues/510

Note that not a lot of effort is done to prevent race conditions: For
example, if the pin change occurs just before sleeping, then the
corresponding pin change handler might not be run, or only after
sleeping. If these race conditions are problematic, short response times
are needed or the pulses are very short, a custom sketch might still be
needed.