A federal judge has barred the Suffolk County Police Department from arresting people for merely loitering for the purpose of panhandling or begging, saying that federal and state court decisions going back almost 20 years have ruled that such laws are unconstitutional.