A Machine Learning Approach for Simultaneous Demapping of QAM and APSK Constellations