build: clean up otasigcheck

- Only mount and unmount /data if it was originally unmounted
- Don't use comparison hack, just check the result of the script

Change-Id: I4a22485d315cf91e95ce578907c49f5fa3a03222
build: Only mount /system if not mounted

The commit on which this depends takes care of the mount error if /data
is already mounted during install. This commit takes care of the error
if /system is already mounted.

Change-Id: I97d0540676a7ce98762545e76ecb1a7f6335d204
Enable QCOM_BSP_LEGACY flag for pre-8974 targets

Change-Id: I895f1b1cbad0d260e1bca87ccb61e6194de023fd