California cities could buy beach homes, rent them before waves swallow coast