Improved repr():
* Numbers are rendered properly.
* Nil is rendered using tostring().
* Double quotes (") and backslash (\) are escaped properly.
* Added encoding tag.
* Cleaned up documentation comment.