Scan for non-NULLs in print events

This is a pull request for the changes per [github: hexchat: issue 915: *Python Plugin: scan for non NULLs in print events*](https://github.com/hexchat/hexchat/issues/915).

It differs from the earlier patch in that:

1. Made `Util_BuildEOLList` into `Util_BuildEOLListFromList`, which avoids some code duplication  
2. Also modifies `Callback_Print_Attrs` which didn't exist when I wrote the original patch  

Thanks.