Tweaks to build-solr script

* Use set -e so that script fails if patches fail to apply

* Add some additional checks for robustness
Update solr dist search patch to apply to 4.4.0