opam_install.sh: revive error() that works well under -e.

Notes on scoping/evaluation rules of POSIX SH: only passing
bar:$3 as foo:$1 is problematic in the below script.

! /bin/sh

set -e

foo () {
    echo "x==[$x] y==[$y] \$1==[$1]"
}

bar () {
    x=$1
    y=$2
    foo $3
}

bar "a b c" "1 2 3" "P Q R"