Coherence properties of a two-dimensional trapped Bose gas around the superfluid transition