Church founded by freed slaves 150 years ago holds final service in historic building