few fix on code, improve/complete doc and UT

Code:
* R_TEST => RTEST
* typo enternal => external
* remove macro on rb_define_method for rdoc
* start_dtd_entity:
  - pe argument optional (default: false)
  - pe argument was ignored
* write_dtd_internal_entity: 3 arguments not 2

Documentation:
* XML::Writer => writer for instance methods

UT:
* encoding
* dtd attlist
* dtd element
* (internal) dtd entity