Deutsche Banks Swiss unit agreed to pay $31 million to receive a non-prosecution agreement in a U.S. probe of banks in Switzerland that helped Americans evade taxes.