Plans have been lodged to demolish an Edinburgh church and build 35 ‘affordable’ flats in two new blocks.