posix: Fix timeouts functions for values > 1 second

All the *timeout() functions incorrectly assumed, that that timeout is less
than a second. Reporter of this bug would like to remain anonymous, but thanks
anyway! Fixes #10.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Lua: Fix possible memory leak in lua_port_open()

This patch fixes #11, in which Tieske has reported, that in case
luaL_checkstring() fails, there would still remain struct rs232_port_t
allocated, thus possibly producing unwanted memory leak.

Signed-off-by: Petr Štetiar <ynezz@true.cz>