tests: Fix some compile errors and warnings

* aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning.
* bgp_capability_test.c: compile warnings.
* bgp_mp_attr_test.c: update for attr parser context struct
* ecommunity_test.c: ecommunity_free/ecommunity
* test-checksum.c: some unused vars and funcs without need of prototypes.
diff --git a/tests/test-checksum.c b/tests/test-checksum.c
index bd156ba..fc4eb02 100644
--- a/tests/test-checksum.c
+++ b/tests/test-checksum.c
@@ -32,7 +32,7 @@
 {
   u_int8_t *p;
   u_int16_t *csum;
-  int i, init_len, partial_len;
+  int i, partial_len;
   struct acc_vals ret;
   
   csum = (u_int16_t *) (buffer + off);
@@ -41,7 +41,6 @@
   p = buffer;
   ret.c0 = 0;
   ret.c1 = 0;
-  init_len = len;
   
   while (len != 0)
     {
@@ -397,11 +396,9 @@
   u_int8_t *p;
   u_int32_t c0;
   u_int32_t c1;
-  u_int16_t checksum;
   int i, partial_len;
  
   p = buffer;
-  checksum = 0;
 
   c0 = 0;
   c1 = 0;
@@ -427,7 +424,7 @@
   return 1;
 }
 
-int  /* return checksum in low-order 16 bits */
+static int  /* return checksum in low-order 16 bits */
 in_cksum_optimized(void *parg, int nbytes)
 {
 	u_short *ptr = parg;
@@ -459,7 +456,7 @@
 }
 
 
-int /* return checksum in low-order 16 bits */
+static int /* return checksum in low-order 16 bits */
 in_cksum_rfc(void *parg, int count)
 /* from RFC 1071 */
 {