Extend record macros to return field index in tuple

Use the syntax (record-field), i.e. without record variable. Also took
the liberty to move record processing out of lfe_macro into separate
module.