Add a getINSlots function to Signature and use it instead of parse

The Signature::parse function is only used in vm.js to get the IN slots, but it does a lot more than that. This patch introduces a getINSlots function that does only the minimum necessary.