added intellij idea specific files to .gitignore
added cleanup of aggregates if max count in memory is exceeded