Sliding naturalness: cosmological selection of the weak scale