Add job-state-transitions to Job History API

we need to check if this query is fine performance wise. this is similar to `agent job run history` query.