Patients will be able to view test results and track appointments in the NHS Wales app as part of a major expansion announced by the Welsh Government.