include/download.mk: handle .gitattributes rules on rawgit method
This fix a long lasting bug/inconsistency with rawgit method and
dl_github_archive script.
The dl_github_archive script works by using the github generated tar.gz
instead of cloning and checkout and the tar.gz is generated by using git
archive command that parse and apply .gitattributes rules.
rawgit command never handled .gitattributes and instead made a simple git
clone and checkout causing the inconsistency.
To fix the inconsistency, add extra steps to call git archive command
and generate an intermediate tar to apply .gitattributes rules.
Also for git log format, Github shorthash length is 8 instead of the
default 7, also apply this locally for each cloned repo to produce
consistent tar.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>