Consolidated CPort dependencies to CPort lib

CHandlers library had typedef scoping errors when used with the CPort
header. I moved the functions and typedefs to the CPort header because
of how closely related their functionality is. This is actually better,
because CPort is an abstract port definition, and should have unique
ways to handle data depending on the port.