Finished v1 of Effects CGI library.

- Refactored pure functions out of Cgi.idr as it was getting a tad
  unwieldy
- Renamed ActionTy to CGIProg
- Fixed problems with nonexistent env vars causing segfaults