First-principles study of structure and stability in Si–C–O-based materials