query.c's context_rebuild_setup() minimizes setups now.

context_rebuild_setup() seems to be the best place to do minimization to
always have minimal setups but avoid redundant minimizations on the
other hand.

Added a little documentation about minimization.

Also removed setup_init_static_and_dynamic() because was is only used in
tests. One can use setup_init_static() and setup_init_dynamic()
separately and take their union.
Merge branch 'master' into esf