Fixes for use of inline in headers

   * Make inline functions static to avoid link errors if the compiler decides not to inline.
   * Take inline off functions without a definition in the header.