API.get workaround for (probably) bug in VisitsSummary + refactor of hideShowMetrics

I've found an issue while using ```showColumns``` parameter in API calls that use VisitsSummary module. It just doesn't work because ```hideShowMetrics``` is checking **keys** in array ```$availableReport['metrics']``` that is just invalid in this one case. I don't know why it's not built as other module's arrays and made a workaround (decorated with ```FIXME``` comment) for this one case.

To not duplicate myself (```is_int($name)```) I decided to refactor the whole function and iterate over ```$columns``` array passed to it only once.

**I recommend considering this as a hotfix if VisitsSummary is working just fine with it's metrics array``` and include similiar patch in 1.11.1 release.