Armenia and Azerbaijan say they will move towards normalising relations, and will exchange prisoners captured during the fighting in Nagorno-Karabakh.