Added `upgradeResource` to some resource parsing functions.
Added `upgradeResource` to some resource parsing functions.

Currently only `Resources::parse()` calls `upgradeResource()`,
but other parsing functions `Resources::fromJSON()` and
`Resources::fromSimpleString()` which are also public utilities
do not, this may produce invalid resource objects.

This patch moves the `upgradeResource()` to the two internal
parsing functions, so that all resource objects parsed are
valid.

Review: https://reviews.apache.org/r/65844/

kaysoky/mesos,kaysoky/mesos,andschwa/mesos,gsantovena/mesos,chhsia0/mesos,kaysoky/mesos,reneploetz/mesos,chhsia0/mesos,reneploetz/mesos,reneploetz/mesos,andschwa/mesos,jpeach/mesos,dforsyth/mesos,abudnik/mesos,asamerh4/mesos,dforsyth/mesos,kaysoky/mesos,Gilbert88/mesos,dforsyth/mesos,jpeach/mesos,kaysoky/mesos,asamerh4/mesos,gsantovena/mesos,jpeach/mesos,chhsia0/mesos,andschwa/mesos,reneploetz/mesos,asamerh4/mesos,dforsyth/mesos,abudnik/mesos,asamerh4/mesos,abudnik/mesos,Gilbert88/mesos,jpeach/mesos,jpeach/mesos,abudnik/mesos,gsantovena/mesos,andschwa/mesos,andschwa/mesos,reneploetz/mesos,Gilbert88/mesos,Gilbert88/mesos,reneploetz/mesos,andschwa/mesos,asamerh4/mesos,chhsia0/mesos,chhsia0/mesos,andschwa/mesos,gsantovena/mesos,abudnik/mesos,kaysoky/mesos,chhsia0/mesos,Gilbert88/mesos,asamerh4/mesos,dforsyth/mesos,Gilbert88/mesos,asamerh4/mesos,dforsyth/mesos,kaysoky/mesos,jpeach/mesos,chhsia0/mesos,reneploetz/mesos,gsantovena/mesos,Gilbert88/mesos,jpeach/mesos,gsantovena/mesos,abudnik/mesos,dforsyth/mesos,gsantovena/mesos,abudnik/mesos