gpio_relay.py: add a sleep for testing

The GPIO library will clear all pins when it's shut down
sensor: add last_value() function for retrieving polled values
Added simple_thermostat with example

This adds a very simple thermostat controller and an example of how to
build a working thermostat with one.