NBC: Former Maryland mayor avoids prison in revenge porn case