types: Add a simple testcase for basic types and fix the LLC code

* Make append_data, remaining_space and fits_in_current.. work
  on m_length and not the index. This ways things can't overflow.
* The current API consumer was moving the m_index so it should have
  worked okay.
diff --git a/src/llc.h b/src/llc.h
index f1692f4..f50419c 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -63,7 +63,7 @@
 
 inline uint16_t gprs_llc::remaining_space() const
 {
-	return LLC_MAX_LEN - m_index;
+	return LLC_MAX_LEN - m_length;
 }
 
 inline uint16_t gprs_llc::frame_length() const
@@ -85,5 +85,5 @@
 
 inline bool gprs_llc::fits_in_current_frame(uint8_t chunk_size) const
 {
-	return m_index + chunk_size <= LLC_MAX_LEN;
+	return m_length + chunk_size <= LLC_MAX_LEN;
 }