If 2 libs have same .h file, use the lib with same dir name

When 2 libraries have a header with the same name, Arduino will use the last one it finds, because the list is built with very simple code that stores the last directory name it finds.

This has caused a lot of headaches for libraries like Adafruit_GFX where a copy is located in Robot_Control.  Even with Robot_Control modified to avoid this specific conflict, the opportunity for incorrect matching is still present.  ANY library that contains the file "Adafruit_GFX.h" can cause the correct library to not be used by the Arduino IDE.

This patch causes the IDE to always give preference to a library whose name matches the header file.

If 2 libraries have the same header, but neither matches the library name, the IDE will still use the last one it find.  This patch only addresses the easy but most important case, where the header and library name match.