What is the HbA1c test and why is it important for blood sugar monitoring?