stdlib/text: Added method to_buffer on Text and subclasses, replaces new Buffer.from which is now private.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>