ca-cas.h: Add C++ support

C++ does not support static array indices, and need extern "C" around function
declarations for proper mangling.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Use temporary variable to simplify pointer syntax

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>