canonicalize: reduce memory usage
canonicalize was returning a 4k buffer for everything, even though
the majority of canonical path names are much shorter. This
resulted in a lot of unused memory, which in turn made tar run
out of memory when tracking a lot of files:
http://lists.gnu.org/archive/html/bug-tar/2009-12/msg00011.html
* lib/canonicalize.c (canonicalize_filename_mode): Trim the
allocation to size.
Reported by Solar Designer <solar@openwall.com>.
Signed-off-by: Eric Blake <ebb9@byu.net>