Use std::shared_ptr and std::weak_ptr to keep track of PETSc DMs.

This way we can re-use DMs allocated earlier (if possible), so that we
optimize RAM use by keeping only one DM for a given (dof,stencil_width)
combination *AND* de-allocate a DM as soon as it is not used any more.

The DM reuse part is not new; the de-allocation is. This is *not* an
important change, but it is much cleaner, plus #132 is taken care of
now. (Previously PISM had no way of telling if a DM is still needed or
not.)

All tests pass, the Python bindings work (the interface file is a
bit cleaner, too), but I discovered that some scripts in
examples/inverse are out of date.
Correct option name to -hydrology_input_to_bed_file and document it and related options.
Fix #278.
Implement and document option -hydrology_bmelt_file and diagnostic hydrobmelt.
Add option -hydrology_velbase_mag_file and diagnostic hydrologyvelbase_mag.
Merge branch 'dev' into feed-hydrology-from-file
Fix problem where read from file of diagnostic variable velbase_mag has _FillValue below valid_min.
Whitespace changes.
Fix an unreported bug. Port to 0.6.

3D diagnostic quantities computed on demand did not work with automatic
vertical grid extension: saving "cts" could make PISM create an output
file with the number of z levels corresponding to the old vertical
grid (before automatic extension). This lead to a crash when a properly
"vertically extended" field was saved.
Use x0,y0 and Lx,Ly in grid_info (instead of {x,y}_{min_max}).
Use the xy-periodic grid by default.
Use non-periodic grid in the symmetry test.
Update the vertical interpolation (regridding) test.
Better grid coordinate computation.

The grid is centered with respect to (x0,y0) now.
Use the old default (non-periodic grid) in regression tests.

I could update all the verification test error reports stored in
regression scripts, but this is easier.
Fix #277. Port to 0.6.
Add OPTIONAL_FILL_MISSING and CRITICAL_FILL_MISSING regridding flags.

Use these to replace missing values matching the _FillValue attribute
with a provided default value.

See IceModelVec::regrid() for details.

There is no way to do this from the command line, and this does not
affect user-observable behavior.

PS: This is to let hydrology models read in the sliding speed, which in
    PISM output files has missing values in ice-free areas.

PPS: In a regular run PISM should probably stop with an error message if
     a variable contains missing values. What do you think?
Merge branch 'dev' into json-config