Move components to separate classes.

Also collects all 9 patch related information into PatchInfo,
add adds some basic tests for PatchInfo.

Change-Id: If5d8acbb169416290a2a0298526889b8f7960e32
7 files changed