Rewrite all IO. add timeouts, and support for true non-blocking mode.

This check-in is a major rewrite. There seem to be many reported
reliability issues with this class and I believe this is largely because
fwrite() and fread() were assumed to always read and write exactly as
many bytes as they are told to, which is in no way guaranteed by the php
API. The IO changes also add clarity and functionality though are
certainly less cleverly written.

- added var _dBlocking, confBlocking() and getFilehandle() members in
  order to enable a real non-blocking mode.

- BEWARE! Removed $waitForReply from sendMessage() arguments and
  replaced it with "$len". waiting should happen outside the class.

- Added _buffer management methods: appendToBuffer(), setBuffer(),
  getBuffer(), getBufLength()

- Added method writePort() as a counterpart to readPort(). These allow
  read/write access without altering _buffer.

- Dramatically altered the readPort() interface. The result is that
  real buffer managment is possible, and a timeout is added.

- Refactor serialFlush reflect IO changes.

- added non-classmember utility function floatsec_to_secusec() and makes
  stream_select() a little easier to use.

The $waitForReply parameter in the sendMessage() context is clearly
added for convenience of the caller.  sleep()s don't belong inside of
libraries though, whereas event-driven blocking is clearly tolerable. If
a class-user wishes to introduce a sleep(), then s/he should do so
outside the class.

some may object to getFilehandle() on the grounds that it can be used to
violate the encapsulation OOP principal, but this is the best way I can
find, so far (admitted without doing any research) to allow this class
to be easily used in an IO event loop.  There are undoubtedly less
expedient ways to do the same thing, but this way is simple. KISS should
win over pedantic OOP. If there's truly a better way let me know, or fix
it.
1 API correction. allow using readPort() to append to $content

confBlocking() did not return any value in the absence of an error, but
it should instead return true on success. made this correction.

in readPort():

- always overwriting $content is inconvenient and unnecessary. instead
  append the read data to $content.

- remove assert() which demanded a 1-to-1 correspondence between the
  length of $content and the amount of data read.

- alter a comment in the while() statement, to help make clear that when
  the paramater $count==NULL, then the loop will execute once only.
correct a syntax error. ick.
refactor confBaudRate() to correct some API inconsistency

confBaudRate() in some cases didn't clearly return a boolean, though it
is supposed to.  The code also lacked clarity, having several
ambiguities.  This change is more significant than is strictly
necessary, but so many changes were advisable that it was easier to
largely rewrite it. There is now one exit point with a clear return
value which now is clearly set properly at different possible points in
the function. Made some readability improvements too.
Make example.php compatible with changes and exhibit new features.
Add a useful example that further demonstrates the new features.