rename buffer -> real_buffer to avoid clashes in nn

there are a few places where 'buffer' is used for variable names in the nn source that clash with the new #define buffer. I think it makes more sense to rename the macro to something slightly less generic.