Fix idempotent write (again).

For some reason opening rw and seeking not working for new pwm slot;
revert to janky method.
Wait until run path created to stop device in create_pwm_device.
Bug fixes: pulse width >= 0; set device pin in write_pwm_* methods.
Rename PWM class to PulseGenerator and take pulse width in ns.