MyriaApiException: create new RuntimeException to wrap cause for Java

The current method was conveying the response to the user, but was not
keeping the explanation in the throwable itself for presentation in
Java exception toString() functions.
extend resource manager to manage input buffers
Adjust input buffer related codes

One change leads to another, the changes look a lot but there is only
one goal. That is, moving the input buffr management into
ResourceManager.
Cleanup physical channel states

demap the logic channel from the physical channel.