Scotland's A&E waiting times target met for first time in three years