Fix default value issue

Enable default value for FFI. 

Fix method resolution issue at code gen.  Previously the code gen just simply returns the first function whose arguments' number is larger than the number of input parameters (so that default arguments will be used) without considering other functions which have better match. 

Test cases in language and in Dynamo are added.