Updated for current versions of Rake

fixed deprecated rdoc and gem package tasks
Implemented read_nonblock and write_nonblock

specs directly from rubyspec