allow the opm-parser test to fail

since the module currently calls the tests for cJSON and boost with
the REQUIRED flag set, cmake aborts completely even if opm-parser is
not REQUIRED. For modules which depend on opm-core that's currently a
non-issue because core has a requirement on parser, but the parser may
be useful for external projects as well, so we play nice.

Also, with this patch the config.h variable HAVE_OPM_PARSER is set...
Findopm-parser.cmake: make sure that the ERT libraries are available

and some other minor cleanups to the module. For me it still works,
but this being the build system, I can't guarantee more...
Findopm-parser.cmake: invoke FindBoost unconditionally

even if boost was found previously, it might still miss a few
libraries. thanks to @akva2 for catching this.
Disable search for Boost in parser detection

This changeset disables the effect of commit 778e87d.  There appears
to be an unforeseen interaction between the calls to

    Find_Package (Boost)

that are implied by module 'opm-parser-prereqs.cmake' and the one
that's directly invoked in 'Findopm-parser.cmake'.  Until the
situation can be fully analysed and a complete solution implemented,
this is a temporary measure to restore the build of opm-core and
downstream OPM modules.
added: hook for conditionally compiled files

backport from opm-upscaling PR#100
Merge pull request #155 from bska/154_cmake

Synchronise build system with OPM-Core
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.