Self-assembled carbon nitride for photocatalytic hydrogen evolution and degradation of p-nitrophenol