signatures are now added in order of pubkey

As per https://bitcointalk.org/index.php?topic=390046.msg4687868#msg4687868 signatures need to be in the order of the pubkey to avoid a rejected transaction. This update solves this.