Remove unused preqScript argument to SignSignature.

Remove an unused optional argument to the SignSignature functions to
simplify them.
Simplify SignSignature functions.

Simplify the two SignSignature functions by making one call the other
instead of duplicating the code.
Make argument const that can be.

Make a passed-by-ref argument that is never changed const to make this
explicit.
Unify signing of name and non-name inputs.

Unify the signing of name and non-name inputs in the code.  This also
makes signrawtransaction work for name-operation transactions.
Correctly set tx version in createrawtransaction.

If createrawtransaction is called with a name operation, correctly set
its nVersion as a namecoin tx.
Merge pull request #40 from domob1812/fix-signatures

Port signature-code simplifications and fixes from Namecoin
Merge pull request #41 from domob1812/db-updater

Port database class from Namecoin