Refactor code for writing test

Remove interactivity in projectile-get-other-files. The function now
only returns candidates based on input. It is now a pure function that
accepts the same input and return the same output.
Add another example for projectile-find-other-files

So that people may not misunderstand that it is merely used for
switching C/C++ files.
Fix inaccurate matching and improve matching behavior

For more precise result, we need an exact match of extension. If
extension list contain extensions that are substrings of other
extensions not in the list, wrong candidates are pulled into the result
list. For example. consider the case .c <-> .h. Because .h is part of
.hpp, other files with .hpp are also returned. This is fixed with $
sign - the end of line regexp.

When switching from Gemfile.lock to Gemfile, the extension of other
files are empty. Currently, empty extensions got a dot "." added to the
end of other file candidates, leads to nil result.

This change also makes matching stricter. Now other files got matched
with their exact names, not adding anything before or after. For
example, getting other files for "fpu.h" should return "fpu.c", and a list
of "fpu.c" if more than one exists. The current matching is that, it gets
the string "fpu" from "fpu.h" and find any filewith "fpu.c" in it, for
example files such as "fpu_nofpu.c", "fpu.c"... essentially anything
with "fpu.c" as suffix.

IGNORE-EXTENSIONS is now renamed as FLEX-MATCHING. That is, it matches
other files with different predefined extensions in the alist, AND
contains the filename as part of its name. For example, if I use
FLEX-MATCHING with "fpu.c", then the command returns files like
"fpu_emulator.h" or "kvm_fpu.h". This time, extensions are accounted for
other files: no .c file with "fpu" in its name is returned.
Add more extensions for .h, since it is used in many languages
Add a test case for projectile-get-other-files

Add a test case to demonstrate the usage of projectile-find-other-files
commands and is used for regression testing.
Merge pull request #426 from tuhdo/master

Refactor code and add a test case