simplify renderbuffer clearing
improve stage3d DrawPrimitivesFromMemory performance
fix iOS termination