pipicpowerd.c try to lock i2c device file port N times

If the initial device file locking fails it is tried again after one
second of time delay. This can be repeated by 'i2lockmax' times if needed.
Otherwise the i2c writing or reading fails. This locking and re-try is
done now in write_cmd() and read_data().