Preparation of magnetic graphitic carbon nitride nanocomposites