Lack of affordable housing 'killing' villages in North Yorkshire