Add formula for PETSc scientific library

(See https://github.com/mxcl/homebrew/pull/14249)

> This adds a formula for the PETSc library at http://www.mcs.anl.gov/petsc/index.html. There are multiple slightly incompatible versions available, but this version (3.1) for example is the newest available on Ubuntu's current release. It is also the version used in my research code.

At this point, 3.2 is the newest in Ubuntu. At any rate, I'm resubmitting this pull request to homebrew-science, as requested. I've also modified the name of the formula to petsc31, to accommodate other versions being included.

If I may ask, why separate these scientific formulas into a separate repository? Is there a discussion I can look at citing the reason for excluding some categories of software from the main repository?