Update AMI build script

Review 1657 by @Tryneus
merge of #2560 ruby driver publish fix

two small changes to fix publishing the ruby driver
adding idle notification for v8 to perform garbage collection
Made bt_wire_func_t deserialization not be broken.
Added an appropriate break statement.
Rewrote a confusing comment.
Added default cases to switch statements in versioned.hpp.
fixing crash on streams with r.js
fixing v8 call to be more compatible with different versions
Merge branch 'v1.13.x' into sam_2537
Merge branch 'sam_2537' into sam_2563