Depends on what you want to learn, and how you want to learn it.
If you want to learn how to actually write music note-by-note and be able to write any song using a notation program (Like Finale Songwriter) or be able to read music well and convey notes from your head to paper easily, piano.
If you want to play an instrument you can pick up easily and play alone easily, guitar. Guitar is also good for playing music by 'feel' rather than strict notes and playing specific patterns. Which kinda brings us to Left and Right brained people battles.
Depends on the type of music too, usually the more passionate stuff will contain piano, whereas more rock (or everything else nowadays) leans toward guitar.
Personally, I think if you want to become a songwriter who can write music for most any instrument, go piano. But if you want to have an instrument that's fun to play and perfect, and will always be in the limelight of your playing, go guitar.
From what I've seen by just your post, I'd say piano is your best choice. However, you know more about what to choose for yourself than I ever could.