UK retailer Marks and Spencer (M&S) has reported solid full-year profit growth, as it managed to hold prices steady despite soaring cotton prices.