Phpecc refactor

https://github.com/Bit-Wasp/bitcoin-lib-php/issues/22 Several changes in PHPECC required a refactor of bitcoinlib to account for this. Probably shouldn't have reorganized the code, the PR looks huge... But tests all pass again. 
This is ugly. Should be extensible without hard coding.