[parform] Fix the problem with gzip (#3)

The gzip compression should be switched off for the output file during
the final sorting on the master.
[parform] Fix the interplay between InParallel and Collect

This is a counterpart of the same fix for TFORM.
[parform] Parallelized code optimization

optimize.cc
===========
We assume all the processes call Optimize() at the same time. The
optimization in ParFORM is done as follows: first, because only the
master can access to the expression to be optimized, the master
has to broadcast the expression to all the slaves. Then, as in TFORM,
tasks in find_Horner_MCTS_expand_tree() and
optimize_expression_given_Horner() are distributed over the slaves.
Because we cannot use the lock mechanism (unless we assume MPI2), more
works must be put on the master for the MCTS: the master expands the
search tree, prepares a complete Horner scheme, and sends it to a slave.
The slave applies the Horner scheme and sends back the number of
operations to the master, which is used for updating the search tree.

For get_expression(), find_Horner_MCTS_expand_tree() and
optimize_expression_given_Horner(), the ParFORM version of them are
added:
  PF_get_expression()
  PF_find_Horner_MCTS_expand_tree_master()
  PF_find_Horner_MCTS_expand_tree_slave()
  PF_optimize_expression_given_Horner_master()
  PF_optimize_expression_given_Horner_slave()
PF_get_expression() is for broadcasting the expression which the master
gets by the original get_expression().
The others are for distributing the tasks based on the master-worker
model. The pseudo code is like:
  if (the process is master) {
    PF_find_Horner_MCTS_expand_tree_master_init();
    for (int i = 0; i < max_trials; i++) {
      PF_find_Horner_MCTS_expand_tree_master();
    }
    PF_find_Horner_MCTS_expand_tree_master_wait();
  } else {
    PF_find_Horner_MCTS_expand_tree_slave();
  }
The same for the final optimization with a given Horner scheme.

get_expression() is also modified to return the length of the
expression.

To share the code between FORM/TFORM and ParFORM, the code in
find_Horner_MCTS_expand_tree() is divided into three functions:
  next_MCTS_scheme()
  try_MCTS_scheme()
  update_MCTS_scheme()
The meaning of them must be clear if one looks into
find_Horner_MCTS_expand_tree().

pre.c and sch.c
===============
Some codes are added in DoOptimize() and WriteAll() such that all the
processes call Optimize() at the same time and there is no harm in the
slaves.

parallel.h, parallel.c and mpi.c
================================
Make packed communications be public. Their declarations has been moved
to parallel.h.

Add PF_OPT_MCTS_MSGTAG and PF_OPT_HORNER_MSGTAG.

Add a utility function PF_BroadcastBuffer().

PF_BroadcastNumber() is rewritten in a simpler way.

Fix problems possibly occurring during PF_LongSinglePack(),
PF_LongSingleReceive() and PF_LongMultiPack().

Limitation
==========
Due to the limitation of PF_LongSingleSend/PF_LongSingleReceive,
currently it can handle up to about 250 variables, which is enough in
practice. This limitation would be removed by rewriting these functions
in the future.

TODO
====
Rethinking about OLDNUMEXTRASYMBOLS_.