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@yandex.ru>
read-cache.c: use ALLOC_GROW() in add_index_entry()

Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru>
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@yandex.ru>