There were a record number of first-time buyers in 2021, figures from lender Halifax suggest.