Tidy up bootloader code to use common defines and to force the attiny4313
code to the top of memory. Move all serial code to the same file
to ensure it is placed with the other bootloader code.
Change call to 0x0000 to use a jump and only test the bootloader pin
for type 1 AVRs (with bootloader section).
Add a reset after removing bootloader pin signal to force application to start.
Move define headers and serial libs to a use a common set.
Add code for type 2 (AVRs without a bootloader section) to test
bootloader pin and jump to the bootloader address.
Change optimization level to 1 to avoid faulty code generation.