THE MASS AND SIZE DISTRIBUTION OF PLANETESIMALS FORMED BY THE STREAMING INSTABILITY. I. THE ROLE OF SELF-GRAVITY