Reimplement Truncated and Truncated{Normal}. Fix #292

I reimplemented `Truncated` and `Truncated{Normal}`, fixing various bugs in the original implementation. This closes issue #292.