[TWEAK] Make spark-env.sh idempotent by

providing a way for settings to be run only once even if sourced multiple times.