Incoming Finance Minister Philip Hammond said the U.K. Treasury would do whatever it needed to do to restore business and consumer confidence.