gpio: correct direction_output()

The previous implementation could possibly not set the output value when
changing direction to output. This solves it by using a full "set
current chip settings" command, since this appears to be the only way to
go from high-z input to output and not pull high or low when we aren't supposed
to.