Include EQUIL-based inititalisation for 3-phase.
Fix phase property references

Methods 'computeRelperm()' and 'computePressures()' *always* return
a three-element vector of phase properties.  We must therefore
translate to canonical phase indices before indexing into the
results.
variableState: Don't reference non-existing variable

The "xvar" exists only if Gas is active.  Therefore, we cannot
extract that variable from "vars" unless we know that Gas is an
active phase.  Failing to do so would wrongfully increment 'nextvar'
whence the final BHP variable would be an out-of-bounds access.
variableState: Defer r{s,v}Sat calculation

Quantities rsSat and rvSat are not needed unless we have an active
Gas phase.  Don't calculate them until we know that they are
actually needed.
variableState: Use pre-computed list of "all cells"

Class FullyImplicitBlackoilSolver<Grid> already features a list of
"all" cells, built at object construction time.  There's no need to
re-compute that list on every call to variableState() (when Gas is
active).
variableState: Don't form objects when references suffice

There's no need to form new objects, especially for the 'xvar', when
there are existing objects to which read-only references can be
bound.
assemble: Fix out-of-bounds indexing

The 'material_balance_eq' is indexed by active, not canonical, phase
indices.  Replace 'Oil' and 'Gas' with the appropriate 'phase_pos'
values.
Fix one-sided gravity potential calculation

Commit 5112b8a misinterpreted the role of index 'i' and, as a result,
installed code that would only define one-sided gravity potentials of
the first cell (roughly)--albeit eventually using the geometry of the
last active cell.

This commit restores the original, intended behaviour.
Merge pull request #146 from bska/nphase

Fix a few two-phase implementation errors
Merge pull request #158 from osae/equil

Include EQUIL-based inititalisation for 3-phase.
Merge pull request #159 from bska/fix-gpot

Fix one-sided gravity potential calculation
FindCXX11Features: check for a usable std::regex

and add a config.h variable in the opm-parser test.
Merge pull request #164 from andlaus/use_std__regex_if_available

FindCXX11Features: check for a usable std::regex
use extended regular expressions in the test for std::regex

for some compilers (e.g., GCC < 4.9) the default is buggy and
opm-parser thus uses extended expressions...

thanks to [at]bska for digging this up!
Merge pull request #165 from andlaus/test_for_extended_std__regex

use extended regular expressions in the test for std::regex
adapt construction of to EclipseWriter

i.e., don't pass around the UnstructuredGrid object directly, but use
the "generic" interface which is also used in the case Dune::CpGrid.
Update phase condition vector from primary variables.

This is necessary as an interim measure, since the phase condition vectors are
still used in property calculations.
pass the EclipseState and the PhaseUsage objects to EclipseWriter
Merge pull request #167 from andlaus/do_not_pass_shared_ptr_to_EclipseWriter

pass a reference to the UnstructuredGrid to EclipseWriter instead of a shared_ptr
Added test to ensure active gas phase.