Merge properties from related platforms where missing. A custom arduino hardware folder that shares a platform such as avr can provide additional programmers and build/programmer properties that are not defined in other platforms of the same name.

Add more obvious error when the properties of a programmer can not be found. (previously the error was: index is outside of bounds of array)

Remove erroneous board with the same name as the platform. Affected some platforms only.

Fix: Add custom project -D defines to GCC-E library auto discovery.

Fix: Insert custom build flags and defines before the first -D or -I of a recipe. This prevents prep-processor errors during library discovery.

Fix: Issue compiling if a board option changed the variant file name. The stm32 discovery boards use a board option to switch between F4 and F7. This would fail unless tool chains were reloaded or the ide restarted after switch between options.