Added more empty interval tests.

Review: https://reviews.apache.org/r/18858
Cleaned up TaskID validation in the Master.

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