Fix various doc tests

The manual's `link` attribute example code did not compile! For new users that copy and paste example code (like I did), this is pretty frustrating. The master and 0.5 branches have the same doc bug. Since this is a small fix for a frustrating problem, you might consider cherry picking this fix to those branches.

OpenSSL's `SHA1()` function takes a `size_t`, according the Darwin and Linux header files. The FFI tutorial was inconsistently using both `uint` and `libc::c_uint`.

Enable lint warnings for doc tests. I thought this would be a good way to ensure that the docs' example code uses the latest coding style. Is the big, multi-line """ ... """ string too ugly?

For lint warnings that many doc tests fail (e.g. `deprecated_self`, `non_camel_case_types`, `structural_records`), I just enabled them as `#[ warn(...) ]` as a reminder to possibly `forbid` them in the future.

Also fix some typos and remove some semicolons (!!) from the doc test generator Python script.