Scottish Labour leader Anas Sarwar has pledged to do “whatever it takes” to tackle the “waiting times emergency” in the NHS.