Implements the active() method for Serial and Server (Issue #2364).

This improves consistency between the Serial, Server and Client communication classes.