Implement cast for basic myrial types

int(x) => LONG_TYPE
float(x) => DOUBLE_TYPE
string(x) => STRING_TYPE
boolean(x) => BOOLEAN_TYPE

Builds on #217.
nice abstraction cleanup