Add decodeType.

We are working on an "External Program" parser that will allow us to inject test cases directly into feldspar-compiler without having to go through the machinery of feldspar-language. We need to do some type reconstruction for the parser, so having decodeType available would be jolly convenient.

Please review and merge unless there are objections. The parser itself is not yet ready for merge.