builtin/mktree.c: use ALLOC_GROW() in append_to_tree()

Helped-by: He Sun <sunheehnus@gmail.com>
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@gmail.com>
read-cache.c: use ALLOC_GROW() in add_index_entry()

Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@gmail.com>
sha1_file.c: use ALLOC_GROW() in pretend_sha1_file()

Helped-by: He Sun <sunheehnus@gmail.com>
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@gmail.com>