Add comments and tests for BasicBuffer

Calling `URI::Parser.new` at each encoding seems high cost.

https://github.com/ruby/ruby/blob/ruby_2_1/lib/uri/common.rb#L99

How about setting `@encoder = URI::Parser.new` in `initialize` or `ENCODER = URI::Parser.new` in module scope?