Inline intrinsics, unit tests for inline intrinsics and minor fixes

Add more inline intrinsics and unit tests for them, and skip generating
locals for unreferenced objects. Also add support for warning levels.