Several small bugfixes

Signed-off-by: Huang Le <4tarhl@gmail.com>
Support pay_to_publickey script in coinbase checking

Signed-off-by: Huang Le <4tarhl@gmail.com>