Added partials to the dependency array

If AMD is set to true we find all partials defined in each
template/partial processed and add them to a new dependencies array.
That array is filtered to unique values that are not partials defined
in the partials array.