Ruby backend, support for multiple FFunction parameters

This pull request actually has three features, so please let me know if you'd like me to break it up, especially if you don't want to accept all of them.

This pull request contains:

1) A Ruby backend, which is very similar (and based on) the JavaScript one.

2) Support for FFunction types with multiple arguments (used in JS and Ruby backends).

3) The preservation of type information in FFunction. Not needed for either of the above, but it's part of the groundwork I'm looking at for support for FFI callbacks in the C (and possibly other) backends.


I've enabled the appropriate tests for the Ruby backend, and they all pass. They've been run on OSX (Mavericks) with its standard version of Ruby, as well as JRuby and Rubinius. I've also done some testing with RubyMotion (http://www.rubymotion.com), which is part of what got me playing around with this.

For the FFunction change, functions are now declared with a list of arguments. For example:

    twice : (Int -> Int) -> Int -> IO Int
    twice f x = mkForeign (FFun "twice(%0,%1)" [FFunction [FInt] FInt, FInt] FInt ) f x

(a pull request to update the tutorial is also coming)

@cartazio @raichoo  Ok, I think I understand the FFunction mechanism better now. I was thrown by the mix of FTypes and FAny types in FFunction construction in the examples out there. Would it be correct to say that the best style might be to use only FAny for consistency/clarity, even if they're effectively the same here? For example:

    twice' : (Int -> Int -> Int) -> Int -> IO Int
    twice' f x = mkForeign (FFun "twicePlus(%0,%1)" [FFunction (FAny Int) (FAny (Int -> Int)), FInt] FInt ) f x

Thanks for your feedback.