UniGEM: A Unified Approach to Generation and Property Prediction for Molecules