Fix repo keys get truncated if mysql is used

I've mentioned this somewhere before. SQlite has no restriction checking on its column type and length. So basically you can specify a column as any type, and insert any value, no complaint.

It's going to be a problem when we migrate the database into mysql or any other server. In this case, 1024 for key length is not sufficient, and using multi-bytes collation will make that even worse.

Change the column type to BLOB and check for truncated keys, any error key will be logged but should manually regenerated.

Also add feature to regenerate key pairs for repository via repo settings page.

Thanks.