Update a comment about using the .func directive

It is no longer commented out at this point.
Add some minimal test cases of the macro and repetition expansion

By comparing the disassembled output of gas-preprocessor to
the disassembly from plain gas, we can easily test and make sure
we handle the gas features in a similar way as the actual
assembler.
Fix handling of mixed .rept/.irp/.if/.macro

Instead of handling macros and repetitions in two passes, with
.if handling spread out over the two, handle both at the same
time.
Merge the handle_serialized_line function into the preceding loop

Since the second pass loop doesn't handle expanding repetitions
any longer, there's no need to have this as a separate function.
Insert parentheses before replacing symbols with values

This fixes cases of evaluating x-y when y is a negative number.
Defer evaluating .if until within the right scope

This avoids prematurely evaluating .if conditions within
repetitions/macros, that previously were erroneously
evaluated too early if the enclosing environment was wrapped
in an .if.
Allow comparison operators in macro arguments as well

Also add test cases that show that macros can use commas
or omit them.
Convert .ltorg properly for armasm
Consistently use $_[x] instead of @_[x] for scalar parameters
Factorize code for checking whether a label is a register
Factorize code for handling local labels
Allow prepended lines when checking for branch instructions

We could have injected extra lines with temporary labels before
this one, if the line consisted of a numeric label before the
branch instruction.
Remove unnecessary comment type substitution

All comments with the original comment character have already
been stripped out.
Simplify armasm comment handling

Use two separate comment variables - one for the input source
format and one used to comment out directives from the output.

This is necessary if the two input passes are merged.
Merge the two passes

There is no longer any need to do the processing in two passes.
Handle references to local labels in .word/.hword declarations in armasm
Replace multiple occurrances of the same local label in a line
Handle .hword as an alias for .short
Force branches to local labels to be wide instructions in armasm

A branch instruction in thumb mode might either be narrow or
wide, depending on the offset to the branch location.

armasm seems to have a bug when calculating the difference
between two symbols, where there's such a branch inbetween.
If the branch immediately seems to require a wide instruction,
the symbol difference is calculated properly, but if the
branch is made wide as a consequence from another branch
being made wide, the symbol difference isn't calculated
properly.

The bug has been reported upstream:
https://connect.microsoft.com/VisualStudio/feedback/details/839866