Removed unused variables
FileUtils: added function to recursively find files with given extension
Let Sketch.getExtensions() return a List

This simplifies upcoming changes.
Make SketchCode.isExtension work for multiple extensions
Use SketchCode.isExtension in more places
Don't store the extension in SketchCode

Nobody was using it anymore, except for checking against specific
extensions, which is easily done against the filename itself. This
prepares for some simplification of Sketch.load next.
Simplify Sketch.load

By using FileUtils.listFiles, this function can be greatly simplified,
without changing functionality in any way.
Explicitely store a layout type for a library

Previously, the useRecursion and srcFolders were filled on library
creation, based on the existence of the src folder. Now, a layout
variable is set, and the useRecursion() and getSrcFolder() methods
change their return value based on the layout in use.
Simplify Compiler.compileFiles

Instead of doing three passes over the filesystem to collect source
files, it now does a single pass (using the newly introduced
FileUtils.listFiles) and later splits between .S, .c and .cpp files.
This allows sharing more code between the three file types and allows
removing Compiler.findFilesInFolder.

Additionally, this splits compileFiles into a version that compiles all
files in a folder and one that only compiles selected files. This
prepares for later refactoring of the Library class.

This has the side-effect of calling isAlreadyCompiled for .S files as
well (which didn't happen previously). However, since the assembler
command does not produce any .d files, .S files are still always
recompiled, just like before.

Finally, this has the side effect of handling file extensions in a case
insensitive manner during compilation (instead of just during load),
which means that e.g. .CPP files are not just loaded, but also compiled.
Add FileUtils.relativeSubPath

This function allows making a path relative. However, unlike the
existing FileUtils.relativePath, this function only works to make a path
relative to one of its parent paths (e.g. strip a prefix), which allows
it to be a lot simpler.
Remove Compiler.[recursive]CompileFilesInFolder

Since Compiler.compileFiles already knows how to recursively compile
files, it seems pointless to keep these around. Because compileFiles
uses a one-off recursion to list files to compile at the start, it has
to be slightly smarter about creating directories recursively when
needed and needs to fiddle with the filenames a bit (so that the
directory structure within a new-style library is maintained in the
build directory), but those are only minor changes to compileFiles.
Introduce constants for file extensions

This prevents duplicating these lists in multiple places.

As a side-effect, .S files are now handled in sketches as well (instead
of just in libraries), fixing #1616.
Move definition of include and source folders into Library class

Previously, the Compiler class had some special casing for new-style and
old-style libraries and hardcoded source and include paths for those.
Now, this info is moved into the Library class, simplifying the Compiler
class and keeping the new vs old-style library stuff in one place.
Remove unused code
Move include detection from PdeProcessor/Sketch to the new HeuristicResolver class

This offers a more consistent interface to the library autodetection
that can next be expanded to also detect inter-library dependencies.

As a side effect, the resolver now looks through all sketch code,
including any .c, .cpp and .h files. Previously, only the .ino and .pde
files were inspected during preprocessing. This fixes #636.

This commit is based on code by Christian Maglie.
Automatically detect dependencies of libraries as well

Previously, any libraries #included by the sketch were added to the
include path and link, but any libraries included by other libraries
were not. This meant that all libraries used, even indirectly by other
libraries, must be explicitely included in the sketch.

This commit changes the dependency resolution to become recursive - it
also includes the libraries included by other libraries in the build.

This commit is based on code by Christian Maglie and fixes #236.