I highly recommend taking him in for a urinalysis. It is very possible that he has a bladder infection, crystals or stones that are causing him irritation. Since this can be a painful condition the symptom of him hunching his back fits the scenario. If you notice that he hasn't urinated or has been making frequent trips to no avail then you might seriously want to consider getting him into the vet tonight. Otherwise he should be seen first thing tomorrow. Most of the time the licking is at the penis and not the scrotum but if he has been licking he may have irritated the scrotum as well. They can also get pretty nasty infections. Other then a possible bladder infection he could have allergies and his licking has caused enough irritation that movement causes him to jump. If infection is present in either case he will be put on antibiotics which should bring him relief within a few days. You might want to request a special collar to prevent him from being able to get to his scrotum while it is healing.