i2o: core: implemented _i2o_dev_xfer

_i2o_dev_xfer is the backend function of i2o_dev_xfer. This function is
responisble for handling transmissions in both directions (receive and
transmit).

This function might change the mode of the device as necessary. The mode
is only changed if strictly necessary.

This function can carry out two types of transmissions:
	* raw transmissions
	* buffered transmissions

Raw transmissions are written directly to the I/O chip and immediatly
processed. This means that if a raw receive transmission is requested,
the I2O core driver will contact the correct chip driver and request the
data. Transmissions work in a similar way.

Buffered transmissions work, as the name suggests, with buffers. Receive
operations request data from from a buffer if it is available and write
operations will write data into a buffer if their is space available.

If buffered operations are required and there is no data available (rx
operations) or the buffer is still full (tx operations) an error is
returned.

Buffered operations are in general faster than raw operations. Raw
operations might however be more accurate.

Signed-off-by: Michel Megens <dev@michelmegens.net>