Add option --list-file-types

This patch documents the file types which were made searchable in #283
Add bash completion for --list-file-types
replace dummy variable name with sth meaningful

This also avoids a warning from the compiler about i already being
declared.
Revert "Cast const char* to char* to avoid compiler warning"

This reverts commit 23fc6d9d1061f201e000859306743608d21aeab5.
I get a compiler warning because of this change. Here is what I get:

> cast discards ‘__attribute__((const))’ qualifier from pointer target
type [-Wcast-qual]
unit test the list_file_types option
Pull from greg0ire's list_file_types branch. Fix conflicts.