Ab initio determination of the proton affinities of small neutral and anionic molecules