A historic church that played a central role in one of Scotland's most-loved novels, Sunset Song, has been put up for sale.