Exclude a few lines from lcov coverage stats:

- "fail" branches in selftests
- "should never happen" errors in SSL
- cipher_xxx() failures in SSL
- some things that fail only if malloc() fails
- some things that fail only if fread/fwrite()/ftell() fails
  (after fopen() succeeded)
- some things that fail only if a parameter is invalid, but the parameter was
  actually validated earlier
- generated code in library/error.c
diff --git a/library/ecp.c b/library/ecp.c
index 858540b..b352376 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -780,7 +780,7 @@
         return( ecp_normalize_jac( grp, *T ) );
 
     if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL )
-        return( MBEDTLS_ERR_ECP_ALLOC_FAILED );
+        return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); // LCOV_EXCL_LINE
 
     mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi );
 
@@ -1352,10 +1352,10 @@
     {
         T = mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) );
         if( T == NULL )
-        {
+        { // LCOV_EXCL_START
             ret = MBEDTLS_ERR_ECP_ALLOC_FAILED;
             goto cleanup;
-        }
+        } // LCOV_EXCL_STOP
 
         MBEDTLS_MPI_CHK( ecp_precompute_comb( grp, T, P, w, d ) );
 
@@ -1958,13 +1958,13 @@
         if( add_count != add_c_prev ||
             dbl_count != dbl_c_prev ||
             mul_count != mul_c_prev )
-        {
+        { // LCOV_EXCL_START
             if( verbose != 0 )
                 mbedtls_printf( "failed (%u)\n", (unsigned int) i );
 
             ret = 1;
             goto cleanup;
-        }
+        } // LCOV_EXCL_STOP
     }
 
     if( verbose != 0 )
@@ -1995,13 +1995,13 @@
         if( add_count != add_c_prev ||
             dbl_count != dbl_c_prev ||
             mul_count != mul_c_prev )
-        {
+        { // LCOV_EXCL_START
             if( verbose != 0 )
                 mbedtls_printf( "failed (%u)\n", (unsigned int) i );
 
             ret = 1;
             goto cleanup;
-        }
+        } // LCOV_EXCL_STOP
     }
 
     if( verbose != 0 )