Ignore terminal task resources in the Master's Framework struct.

Review: https://reviews.apache.org/r/25844
Fixed an executor accounting bug in framework re-registration.

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