making AsyncChain typesafe by using a separate builder that maintains
the type per function addition.

also use the iterator instead of copying the array - more idiomatic
java, and this should make things "a bit" more efficient.

fixing some typo

Actually add the function to the list.