Nonmonotone subgradient methods based on a local descent lemma