* Add STATE_UNAVAILABLE to states that are ignored when writing to the
database. This will avoid a field type error for string if the field
already contains a different type, eg integer.
* Add test for ignored states for influxdb.
* Clean up influxdb tests.
This adds tests for the influxdb component. It also fixes a bug,
where username and password are required, but not gracefully
handled if they're missing from config.