Update SRS generating script

It seems qgis_srs.sh somewhat falls behind the current status of db files. Though I am not even sure it is still used for managing those, here are some changes I made.

1. Reflect recent changes of tbl_srs.
While QGIS app seems to support migration, it wouldn't be bad having one intact. The newer `deprecated` field is populated by looking at *"deprecated"* string in SRS name field.

2. Update table/view schemes.
Table/view schemes have been matched with the current ones. (as of 12106b8) Those range from adding subtle differences on `PRAGMA` and `JOIN` to dropping `mk_tbl_srss_srs()` which no longer looks different from `mk_tbl_srss_qgis()`.

3. Support running on Mac OS X.
As Mac OS X basically does not provide GNU `sed`, but only BSD one, projection parameter extraction fails miserably. Avoiding incompatible newline trick, `tr` and `awk` do a bit more work.

It has been tested on Mac OS X 10.8 and Ubuntu Linux (from OSGeo-Live).