What libraries do people use to implement and evaluate cryptography protocols? I want to implement this credential system: “Anonymous Credentials Light” (PDF). The implementation would involve some zero-knowledge proof and some exponentiation. 

For some basic group computations like $g^x$, do people usually just come up with their own implementation or is there some famous library that provides such basic operations? If, what would be some of the possible libraries or implementations I could (or should) start with?
You can use any library you like, as long as it is has been tested for the specific algorithm. In other words, if $G^x$ is implemented in a specific library you must make sure that there are unit tests and if it is used in a verified algorithm.

There are some hints you can take from the library to see if it was programmed well:


the code should point to the implemented standard;
the code should use identifiers that can be mapped to the algorithms specified in the standard it implements.


There are some more general security requirements as well of course:


the code should keep to an apparent programming style;
the code should be accompanied with the test vectors;
the code should provide unit tests for (implementation specific) edge cases (maximum integer values etc.); 
the code should provide unit tests for the complementary functions;
etc. etc.


As for the unit tests of the (complementary) functions: this is not often the case, I've seen horrible failures here, including those made by myself) but also e.g. the DH implementation of Bouncy Castle and the CCM code of SJCL. In some sense you could share heartbleed under this as well.

OK, so back to the question: it depends rather a lot about the size of $G$ to find out which $G^x$ is most efficient. The choice of library would probably depend on that. Runtimes may already include these kind of algorithms as well, but they may not always be the most efficient choice for certain parameters.

I'd recommend reference implementations if not for the fact that they are often horribly programmed. Mathematicians and cryptographers are just as likely to succeed in software development as anybody else. Quite often they do not keep to the requirements above, often for the sake of brevity.

Finally, you probably should chose a library that fits your programming environment of choice. The library should be quite extensive and the functions well defined; single purpose libraries should not be used unless they have been made for your specific problem domain.