Boult, Elliott bowl New Zealand to tense win over Sri Lanka