Put each HardwareSerial instance in its own .cpp file

By putting the ISRs and HardwareSerial instance for each instance in a
separate compilation unit, the compile will only consider them for
linking when the instance is actually used. The ISR is always referenced
by the compiler runtime and the Serialx_available() function is always
referenced by SerialEventRun(), but both references are weak and thus do
not cause the compilation to be included in the link by themselves.

The effect of this is that when multiple HardwareSerial ports are
available, but not all are used, buffers are only allocated and ISRs are
only included for the serial ports that are used. On the mega, this
lowers memory usage from 653 bytes to just 182 when only using the first
serial port.

On boards with just a single port, there is no change, since the code
and memory was already left out when no serial port was used at all.

This fixes #1425 and fixes #1259.
Make all access to the HardwareSerial ringbuffers atomic

This prevents a potential race condition where for example write() would
detect that there is room in the tx buffer, an interrupt would trigger
where the interrupt handler writes to Serial filling up that room, and
write() would then reset the head pointer, effectively throwing away the
bytes written by the interrupt handler.

References: #1147