Cape Cod towns have curbed unruly July 4th beach crowds with stricter rules, increased patrols and proactive enforcement.