log_analyzer : Reduce greps, increase performance

Grep only one instead of twice each for all functions and error
functions. This reduces time taken by the analyzer to nearly half.
Merge pull request #1 from kshlm/better-log-analyzer

log_analyzer : Reduce greps, increase performance