Patients who take up walking after surgery can significantly reduce the risk of complications and being readmitted to hospital, research suggests.