A yearslong legal battle over attempts by Rhode Island's second-largest city to ban panhandling is coming to a close with the dismissal of charges against six advocates for the homeless who were ticketed four years ago for protesting the ordinance that opponents said was unconstitutional.