Add support for %pre scripts and --erroronfail

* Add support for %pre scripts that get run right after ks parsing and repo initialization
They don't get run in chroot, and have $INSTALL_ROOT exported in their environment

* Honor --erroronfail option to %pre and %post scripts

Signed-off-by: Islam Amer <islam.amer@jollamobile.com>