Enhance type handling

• Add Range support
• Simplify primitive and java type determination
• Fix bug in DatabaseMetaData
• Fix bug in ResultSetMetaData
• Fix bug in Records decoder