Abelianization of the BGG resolution of representations of the Virasoro algebra