Added code to set the port_agent's heartbeat, and associated tests.