[libosmocore PATCH v2] src/serial.c: Add serial helper read and write function