It is common to represent a function as a String, and previously that
required re-validating the UTF-8 in a Vec<u8>. The fmt::Write trait
writes UTF-8 directly into a String, so no extra checking is required.
This also means we can implement Display for Function which gives it a
to_string() method. This makes the function_to_string() method
redundant, so delete it.
The functions in the write module are no longer generally useful, so
make the module private. The Display trait on Function is all we need.