Add get_last_insert_id for sqlite

These changes should be pretty straight forward. Is this the right code style?