.NET API context refcounting; changed int to long to be on the safe side on 64-bit platforms.

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
Bugfix: param_refs didn't make it through to smt::solver (smt_params) in some cases.

Thanks to user xor88 for pointing us in the right direction!

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>