A Topology Layer for Machine Learning