Improvements for the verilog parser

Support for 2001 standard port declaration and scope extraction are added in two separate commits.

Note: this pull request depends on the previous request to pull the "testcase" branch.