firmware: Move EEPROM functions to a more sane spot
firmware: Restructure globals section

This moves all global variables to the same spot, adds comments to some
enums and renames two constants.
firmware: Add make size target

Additionally restructure the makefile a bit to allow make to do some
actual dependency tracking.
firmware: Split main into a setup/loop function

This isn't strictly needed, but it will help to work around a compiler
bug next.
firmware: Remove all default values for global variables

This saves nearly 20 bytes of flash, since the compiler generates a loop
that copies data from flash into RAM on reset, which is a lot longer
than just setting those values in the setup function.
firmware: Store all global variables in registers

This saves over 200 bytes of flash space. Most important savings are
because variables no longer need to be loaded and saved to memory, which
saves a few bytes on every variable access. Additionally, because there
are no longer any globals in memory, the "clear bss" loop is no longer
generated by the compiler, saving a few more bytes.

GCC does have a bug related to global register variables, for which a
workaround is added when using GCC < 4.8 (the bug is fixed in 4.8).
firmware: Fix sending of acks

This code isn't actually used yet, but there were two lines missing.
This should fix things, though the code hasn't actually been tested
yet.
firmware: Recompile when the Makefile changes
firmware: Restructure timera code a bit

This makes the action to be taken by the timera interrupt handler
explicit in a new global variable. This makes the code a bit more clear.

Also, currently the shift to the next bit only happens when the timera
interrupt fires, even though it could sometimes happen in the int0
interrupt already. Additionally, in some cases the timera interrupt
doesn't even need to fire (saving power). This change prepares for
making that possible.

On the downside, this commit makes the code a bit bigger (but only 18
bytes, part of which is because GCC is missing some optimizations...).
firmware: Compile with -Wall
firmware: Prevent timer interrupts for sending 0 bits

Previously, these were required because the timera interrupt handler
needed to advance the next_bit pointer. Now, the int0 handler can also
do this if the timera handler isn't needed for anything else.
firmware: Rename ACTION_ACK to ACTION_READY

This bit in the protocol will become stall/ready, the ack bit will
will be a different bit (if it's added at all).
firmware: Remove useless assignment
firmware: Move bp_write_byte function
firmware: Implement a STALL/READY bit after each byte

This allows a slave to stall the master for a while during processing,
by sending "1" bits (e.g., leave the line floating). When it's done, it
will send a "0" bit and transmission continues.
firmware: Turn the mute boolean into a flags field

This allows using the rest of the bits of this variable as well.
firmware: Add make read_eeprom target
firmware: Add FLAG_MUTE a bit more explicitly
firmware: Add parity and ack bits to the protocol
firmware: Swap interrupt handlers

This just moves them around in the file, no actual changes.