Increase bufsize relative to bufsize.

Previously if there was insufficient space allocated to store stdin, the
allocation would be increased by the constant BLOCK_SIZE.

This commit instead increases the allocation by a factor of BLOCK_FACTOR
(set to 2), with an initial allocation of BLOCK_SIZE. This is beneficial
because the number of realloc() calls scales with larger inputs.