Jail support: more accuracy for state changes; command line '-jail' flag