added avg, favg + corresponding tests and an internal flength function used by both
Merge pull request #379 from UnixJunkie/avg_for_BatArray

added avg, favg + corresponding tests and an internal flength function u...