Fix Fatal error on menu link with &table=

This pull request fixes the Fatal error issue which is reported at https://groups.google.com/forum/#!topic/joomla-dev-general/vNaXN3RGmb8

The reason of the error is because the link has table variable in query string and after the command in line 62 parse_str(parse_url($table->link, PHP_URL_QUERY)); , the table object (which is a local variable in the method) is replaced by the value of table variable in the link (which is an integer value in the sample link) and causes the fatal error

How to test :

1. Create an menu item, type external url, type the sample link http://sbkost.sm-u.de/index.php?seite=spielplan&table=993 (or any url which has table variable in query string)

2. Save it and you will see the fatal error

3. Apply this patch

4. Check it again and make sure the URL is saved.

I also made some small changes the code of getItem method :

1. Remove the line of code parse_str(parse_url($table->link, PHP_URL_QUERY), $args); because it is written in switch block already.

2. Remove the command $app = JFactory::getApplication(); because the $app variable is not used in that method at all.