Prevent segfault when start a RAIL remote Application
channels/server: provide error codes to distinguish between not-registered and not-ready state.
include: add some missing extern C decl.
Merge pull request #1249 from Nigel62/master

Prevent segfault when starting a RAIL remoteApp