Use Rcpp to simplify the code

Switched from double **arrays to Rcpp Vector/Matrix types to make the
code simpler. Vector/Matrix indexing is a lot more readable now. All R C
extension codes are removed since they are now automatically generated
by Rcpp thanks to 'Rcpp attributes'. Also, most of the functions such as
soft_kmeans, hessian, optimise_lambda_k, and calc_z Rcpp-ified, so that
they can be called from within R when they are exported in NAMESPACE.
The main EM loop is now implemented in R. Therefore unit
testing, memoization etc. R packages can be easily employed now. Last
but not least, debugging is definitely easier now :)

(Rcpp sugars can also be used later on to simplify it further.)