Support for mips/mipsel

Fix for issue #98

Avoid unaligned memory access on architectures that don't support it.
Fixed endianness related issues. 
James, Thank you so much for the merge.

I can confirm that the tests are now passing on sparc. The only issue I see is a compiler warning:
```
cram/cram_encode.c: In function 'process_one_read':
cram/cram_encode.c:2288:17: warning: pointer targets in passing argument 1 of 'ua_write4s' differ in signedness [-Wpointer-sign]
      ua_write4s(&cig_to[i], ua_read4s(&cig_from[i]));
                 ^
In file included from ./htslib/sam.h:30:0,
                 from ./cram/cram_samtools.h:61,
                 from ./cram/cram.h:47,
                 from cram/cram_encode.c:46:
./htslib/hts.h:211:20: note: expected 'uint32_t *' but argument is of type 'int32_t *'
 static inline void ua_write4s(uint32_t *ip, int32_t v) {
                    ^
```
I compiled samtools(develop) on top of your branch. Here are the first 2 failing tests:

```
test_index:
	/home/domibel/samtools/samtools view /tmp/W1Ed9QWpit/large_chrom.bam ref2:1-541556283

	The outputs stdout differ:
		/home/domibel/samtools/test/dat/large_chrom.out
		/home/domibel/samtools/test/dat/large_chrom.out.new
.. failed ...

Comment: The outputfile is empty.
```


```
test_mpileup:
	/home/domibel/samtools/samtools mpileup -b /tmp/W1Ed9QWpit/mpileup.bam.list -f /tmp/W1Ed9QWpit/mpileup.ref.fa.gz -r17:100-150
/bin/bash: line 1: 21894 Bus error               ( /home/domibel/samtools/samtools mpileup -b /tmp/W1Ed9QWpit/mpileup.bam.list -f /tmp/W1Ed9QWpit/mpileup.ref.fa.gz -r17:100-150 ) 2> /tmp/leCKJhQAFB

.. failed ...

I looked with gdb at the issue:

Starting program: /home/domibel/samtools/samtools mpileup -b /tmp/7Ib0z6VZj2/mpileup.bam.list -f /tmp/7Ib0z6VZj2/mpileup.ref.fa.gz -r17:100-150
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".
[mpileup] 3 samples in 3 input files
<mpileup> Set max per-file depth to 2666

Program received signal SIGBUS, Bus error.
resolve_cigar2 (s=<optimized out>, pos=17, p=0xd7768) at sam.c:1298
1298	          if (_cop(cigar[0]) == BAM_CMATCH || _cop(cigar[0]) == BAM_CEQUAL || _cop(cigar[0]) == BAM_CDIFF) s->k = 0, s->x = c->pos, s->y = 0;
(gdb) bt 
#0  resolve_cigar2 (s=<optimized out>, pos=17, p=0xd7768) at sam.c:1298
#1  bam_plp_next (iter=0xd5230, _tid=0xffffcf30, _pos=0xffffcf34, _n_plp=0xd24f8) at sam.c:1643
#2  0x00072898 in bam_plp_auto (iter=0xd5230, _tid=0xffffcf30, _pos=0xffffcf34, _n_plp=0xd24f8) at sam.c:1722
#3  0x00072da0 in bam_mplp_auto (iter=iter@entry=0xd5368, _tid=_tid@entry=0xffffcff8, _pos=_pos@entry=0xffffcffc, n_plp=n_plp@entry=0xd0188, plp=plp@entry=0xd0178) at sam.c:1811
#4  0x000138f8 in mpileup (conf=conf@entry=0xffffd1c0, n=3, fn=0xd00e0) at bam_plcmd.c:441
#5  0x00016410 in bam_mpileup (argc=6, argv=<optimized out>) at bam_plcmd.c:880
#6  0xf7cd4a30 in __libc_start_main () from /lib/sparc-linux-gnu/libc.so.6
#7  0x00012b38 in _start ()

```
So this looks like an samtools issue to me. So would it be possible to merge your changes into the official htslib tree?

-Dominique