Implements the active() method for Serial and Server (Issue #2364).
Merge pull request #2588 from kfeuz/Issue2364

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