A Maryland sheriff’s deputy has admitted to abusing his position by snooping through confidential police databases to look up information on his wife, romantic partners, and others, prosecutors said.