Add missing linker flags required for LuaJIT on 64-bit Mac OS X.

This was brought up in #1294.
Merge pull request #1299 from jszakmeister/add-missing-luajit-flags

Add missing linker flags required for LuaJIT on 64-bit Mac OS X.
server: Improve error reporting.

If we fail to bind to the server address, do not try and listen lest the
reported error always be "invalid argument".

Also, return whether or not we errored from server_init() in case we
want to respond differently in the future.
Merge pull request #1297 from splinterofchaos/server-errors

server: Improve error reporting.
rstream: Extract some RStream functionality to RBuffer

RBuffer instances represent the internal buffer used by RStreams.

This changes RStream constructor to receive RBuffer pointers and adds a set of
RBuffer methods that expose the lower level buffer manipulation to consumers of
the RStream API.
ui: Refactor input buffer handling