Magnetosheath plasma stability and ULF wave occurrence as a function of location in the magnetosheath and upstream bow shock parameters