Collective action is needed for the NHS in Wales to overcome workforce challenges, a report by the Auditor General for Wales says.