big: reduce the number of allocations
big: reduce the number of allocations

There was a bug in makeN that caused lots of unnecessary
allocations.  Fixing this exposed a few bugs in other
functions which worked when makeN allocated a new slice, but
failed when it simply resized an existing slice.  The result
is a pretty big performance improvement.  When running
pidigits, here were the numbers I got on amd64:

Before this change:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
        gc pidigits     12.68u 0.04s 12.72r
        gc_B pidigits   12.71u 0.03s 12.75r

After:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.10r
        gc pidigits     6.82u 0.00s 6.85r
        gc_B pidigits   6.55u 0.01s 6.59r

R=rsc, gri
CC=golang-dev
http://codereview.appspot.com/953042

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

npe9/noahevans-go9,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,bryanxu/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,scirelli/scirelli-go,d0f/go-zh,Triskite/willstone-goclone,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,webfd/go-zh,mhennings/marcohennings-go,mhennings/marcohennings-go,Triskite/willstone-goclone,scirelli/scirelli-go,d0f/go-zh,Triskite/willstone-goclone,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,npe9/noahevans-go9,bryanxu/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,webfd/go-zh,d0f/go-zh,npe9/noahevans-go9,npe9/noahevans-go9,d0f/go-zh,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,bryanxu/go-zh,webfd/go-zh,mhennings/marcohennings-go,scirelli/scirelli-go,mhennings/marcohennings-go,rflanagan/reginaldflanagan-project1,rflanagan/reginaldflanagan-project1,rflanagan/reginaldflanagan-project1,Triskite/willstone-goclone,d0f/go-zh,npe9/noahevans-go9,rdp/rogerpack2005-golang,webfd/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,scirelli/scirelli-go,rdp/rogerpack2005-golang,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,npe9/noahevans-go9,Triskite/willstone-goclone,scirelli/scirelli-go,Triskite/willstone-goclone,bryanxu/go-zh,mhennings/marcohennings-go,mhennings/marcohennings-go,rflanagan/reginaldflanagan-project1,npe9/noahevans-go9,glycerine/jeaten-go-arrayof-structof,scirelli/scirelli-go,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,sanjosh/sanjos100-tipc,scirelli/scirelli-go,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,bryanxu/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,scirelli/scirelli-go,npe9/noahevans-go9,sanjosh/sanjos100-tipc,webfd/go-zh,Triskite/willstone-goclone,rflanagan/reginaldflanagan-project1,bryanxu/go-zh