add --deploy option to rebuildstaging

runs preindex and deploy to staging if rebuildstaging goes through
use "$@" instead of $@
Merge pull request #3357 from dimagi/rebuildstaging-deploy

add --deploy option to rebuildstaging