Bio-entrapped membrane reactor for organic matter removal and membrane fouling reduction