Five banks settled with the Department of Justice and New York's Department of Financial Services to resolve charges over foreign-exchange market manipulation.