Hi Sali,
Always nice to see people think outside the box and going at it themselves. Newcomers are always the ones that have the potential to innovate because they approach problems with fresh eyes. Often people come to the same conclusion on how to solve their problems, but now and again people come up with some novel ideas worth pursuing.
Noise reduction (which is what your problem seems to boil down to) is a field of much research. It all comes down to preserving as much detail as possible, while getting rid of unwanted signal.
To do the best possible job, you need to undestand the nature of the noise in your image, as well as the characteristics of the detail you are trying to preserve. If you are able to accurately model the noise, you can subtract it form the signal and be left with the 'clean' signal.
Now, correct me if I'm wrong, but what you seem to be doing is clipping certain parts of the image to black. Aside from space not being pure black, this is quite a blunt way of getting rid of noise. This is because the question of noise is not a black-and-white problem - it is merely a degree of uncertainty in the signal which is quantifiable. For example, depending on your algorithm, a pixel may be deemed to be 25% noise and 75% 'real signal'. There are various ways of representing this in your image (diffusion by means of a Gaussian kernel is a popular one).
If you really want to understand the origin of the noise (and improve your program), I urge you to read up on the different types of noise you will find in your image in your particular situation. Also, don't forget that the JPEG is gamma corrected, modifying the distribution of your noise between dark, mid tone and bright parts (e.g. the noise distribution is no longer linear).
A 'before-and-after' shot would be nice!
As for your question about 'blurring'. What you would be simulating/restoring is an approximation to diffraction of the starlight by the aperture of your iPhone's camera. That profile (also called the Point Spread Function) is not a simple Gaussian blur, but follows the Airy disc pattern (look it up!) - assuming there are no further obstructions and your aperture is perfectly circular.
Cheers,