Re-organized the functions in C++ Resources.

Review: https://reviews.apache.org/r/28078
A few style fixes for C++ Resources and tests.

Review: https://reviews.apache.org/r/28088
Refactored operators for Resource object and made them private.

Review: https://reviews.apache.org/r/28089
Killed ports allocation in C++ Resources.

Review: https://reviews.apache.org/r/28090
Always store validated and combined Resource objects in C++ Resources.

Review: https://reviews.apache.org/r/28091
Replaced size() with empty() in C++ Resources.

Review: https://reviews.apache.org/r/28093
Replaced <= with contains() in C++ Resources.

Review: https://reviews.apache.org/r/28094
Fixed a bug in operator -= for Value::Set.

Review: https://reviews.apache.org/r/28142
Eliminated the copying in Resource addition and subtraction.

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