convert LIMIT to parameter

LIMIT and OFFSET are not supported by all database platforms. We therefore added them as parameters to `OC_DB::prepare( $query , $limit=null, $offset=null )`

@karlitschek @DeepDiver1975 @icewind1991 

As a sidenote: I will submit a PR with a new `OC_DB::executeAudited (...)` call that will do some sanity and error checks that will log the wrong usage of SQL and throw a `DatabasException` to make all developers aware of issues with their SQL.