Contrasting half-centuries from opener Pathum Nissanka and captain Kusal Mendis set up Sri Lanka's 41-run win in the first ODI against West Indies.