This doesn't add to info re: Somerville, but you might know that such throwback ordinances were historically aimed at preventing 'houses of ill repute,' as though this is gateway to becoming a house of prostitution. I know this via the same ordinance being on North Carolina's books and not likely to budge. (we were 6 grad students in 1 house and laughed and thumbed our noses at said ordinance, naturally. )
Jinkies!